GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#1234June 25, 2018by ivanezeigbo3 answers
0 reactions

Template Problems with GrapesJS

Some templates just don't load well. Very simple templates do load properly, but there seems to be a problem with templates with more functions and css. For example, loading a template like this would generate some problems. First, the animation fade in of the letters would not occur. Once inside the #gjs div tags, th...

ivanezeigbo

@artf I don't understand. You tagged this as invalid.

artf

Follow the issue template please and always write ONE problem/question/bug per issue

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1233June 25, 2018by JPPreusDev3 answers
0 reactions

How to grab the html code using javascript

I would like to grab the contents of the created HTML document using javascript so I can submit it using a form. How would I select the HTML content?

cjpollard

https://github.com/artf/grapesjs/wiki/API-Editor#gethtml

ivanezeigbo

These two lines of code give you the html and the css var Html = editor.getHtml(); var Css = editor.getCss();

JPPreusDev

Great! Thank you.

#1232June 25, 2018by Deepak8132 answers
0 reactions

How to change the margin from px to rem

Hi @artf, Hope you are doing fine. I have changed the margin settings from "px" to "rem" in one of the element using below code: { property : 'margin-top', name: 'Top Margin', units : ['rem'], type: 'integer', } but when i re-assign the same margin setting to element after save then its multiplies the margin with 16x...

artf

Please @Deepak813... follow the template of the issue, provide a demo and steps to reproduce

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1231June 25, 2018by ivanezeigbo2 answers
0 reactions

GrapesJs ignores <script> tags of templates (updated)

When I include templates inside the <div id="gjs"></div> tags. It appears that GrapesJs ignores the <script> tags, but every other tag like <link> would work pretty well. The javascript functions in the script tag would not be able to work on the editor because of this. My code is designed to readfile and locate the l...

ivanezeigbo

Figured. Sorry. For those who might benefit from this, you have to set allowScript to '1' in init.

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1230June 25, 2018by pintor-mato3 answers
0 reactions

[Question]: Doctype in the canvas iframe

Hey @artf, I noticed the canvas iframe doesn't appear to have any doctype set on it, which causes it to be in quirks mode. Is this intentional? I'd like to set it to <!DOCTYPE html>, but doing so causes some positioning issues that you can see in this screenshot and demo. Would you be open to a pull request that would...

artf

which causes it to be in quirks mode Which browser?

tomichal

@artf One issue I noticed with the lack of doctype is with HEX color definitions. If a user defines a HEX color as, e.g.: "fff", rather than "#fff", this will work in the editor, but once the page is rendered inside a HTML with doctype spe...

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

#1228June 24, 2018by ronaldaug3 answers
1 reactions

Can't reset CSS code which has parent or child.

Tested on both npm and cdn GJS Version - 0.14.20 (latest) OS - Mac Browser - Chrome Problem If CSS class name has a parent or child like #parent .child{ color: red }, user can't reset the style to origin, it still remain inside CodeViewer. Codepen Demo 1 - Adding CSS from block Codepen Demo 2 - Adding CSS inside #gjs...

artf

To remove the CSS codes that belong to a specific block. Indeed that block of CSS doesn't belong to any component (I'm talking about how the editor works) so that declaration is always rendered. GrapesJS can associate only class-based sele...

artf

This is because you're just clearing components. You can use the built-in command core:canvas-clear

ronaldaug

@artf Thanks for your quick reply. Sorry for my unclear question. What I actually want to achieve isTo remove the CSS codes that belong to a specific block. For example, when I delete a block in the canvas, the CSS codes of that block will...

#1227June 22, 2018by smaqeelkazmi3 answers
0 reactions

Re-render view in editor's canvas whenever Trait value changes

Is there any possible way in grapesjs that whenever a user changes the value of a Trait of a custom component the render function should listening or be re-render? I'm building a custom component for dynamic contents. The custom component code is: I want that whenever user change the value of Trait called Dummy Image...

artf

Update your view in this way

mararn1618

After 2 days this saved my life. Thanks to both of you!

vitanshu

But properties of html are not editable in canvas.

#1226June 22, 2018by DavidSporer2 answers
1 reactions

Specifying tooltips

Hi, I've tried finding information about it in both the code as well as existing issues but either I looked for the wrong information or it's not there, yet. I'd like to specify tooltips for e.g. the Style Manager - how can I do that? I've noticed that in the newsletter presets there are less tooltips than in the webs...

cjpollard

If you search for tooltips in the demo html, the code's there.

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1225June 21, 2018by ionic6662 answers
0 reactions

Specify the content and type for block

when i just set the content like this: Everything is all right. But when I also specify the type, there will be a extra label.can you help me?

artf

Add the type via attribute data-gjs-type="input_box"

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1224June 20, 2018by peakrams3 answers
0 reactions

[Bug] Media query and classes rendering issue

Hi, I was trying to make a responsive layout but I discovered that the device switcher does not work consistently. The issue can be replicated in the official demo. Open http://grapesjs.com/demo.html Keep the "Desktop" as the selected device. Add at the top of the "Header" 2 block of type "2 Columns" (just above the m...

peakrams

Hello. There is or there will be any update about this issue? I've just tried to replicate it in the demo and the issue still persist. Unfortunately, I know only basic JS so I can't think of a way to fix this beaheviour myself. I don't kno...

peakrams

Hi, can someone help me with this issue? I have just replicated (in the demo) the second example I have provided in the opening post and it seems that nothing has changed from the last time. Thank you.

artf

@peakrams, unfortunately, no one worked on this