GrapesJS Issues

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

1180 issues found

#3088October 22, 2020by dharmatv1 answer
0 reactions

BUG: How to view style manager properties after drag and drop

Version: 0.15.9 Are you able to reproduce the bug from the demo? Yes What is the expected behavior? (In newsletter plugin)Click on the component in the builder part which need to show style manager properties related to that component What is the current behavior? Didn't show style manager properties after clicking on...

artf

It's not a core feature, it was implemented in the website preset in this way https://github.com/artf/grapesjs-preset-webpage/blob/3e5a9e12998c9a32b6f1199953084163678e6c17/src/panels/index.js#L108-L118

#3086October 21, 2020by dharmatv3 answers
1 reactions

BUG: How to restrict the style manger properties based upon the component

Version: 0.15.9 What is the expected behavior? Whenever any component drag and drop into the builder part, that related style's properties I need to customize it. For instance Drag and drop the link component into the builder part, then I click on that, it shows the following style properties(Please check the link) ht...

MartinPutz

@dharmatv Hi there! This is not a bug, you can achieve it by defining the styleable properties for a component. Demo: Drag and drop the last block and you will see only (text)color can be changed. https://jsfiddle.net/MartinPutz/o376qsy1/

dharmatv

Hi @MartinPutz Thanks for your reply I understand. My requirement is needed only grapesjs components should not be custom components I didn't mention sorry for that

artf

You can use data attributes <div data-gjs-stylable="['color']"></div>

#3082October 20, 2020by rukavina3 answers
6 reactions

XSS Vulnerability in Live Preview

Version: 0.16.22 Are you able to reproduce the bug from the demo? [ x] Yes Steps:Click Import HTMLInsert <img src="anyimagesource.gif" onload="alert(1)"/>The JS will be executed Having proper "sandbox" attribute on iframe could probably mitigate the problem.

artf

Well if you use GrapesJS and allow the possibility to insert custom HTML, yes, Self-XSS is possible. Unfortunately, there are few issues that do not allow me to fix this properlyI need to access the iframe's DOM in order to add/update inne...

rukavina

You are right, we thought sandbox="allow-same-origin" will do the job, but allow-scripts is also needed, and then it's like not using sandbox at all. But, what could be helpful anyway is to provide a way for grapejs users to somehow contro...

blinkybill

if you use content security policy http header you can get around a lot of XSS issues like this. but there is one issue with GrapesJS atm which is that it uses underscore.js, which includes a function with use of "eval" so you can't make t...

#3081October 19, 2020by maryia-kabash3 answers
3 reactions

BUG: Style Manager setTarget does not work

Version: 0.16.22 What is the expected behavior? setTarget allows styling a CSS rule different from the selected component Describe the bug Upon calling setTarget method Style Manager still has a selected component as styling target What is the current behavior? setTarget doesn't update this.propTarget.model (updates t...

artf

Thanks @maryia-kabash found the issue, will be fixed in the next release!

maryia-kabash

Hello @artf ! I have a question regarding this fix - setTarget now updates classes in Class section correctly, but Style Manager doesn't reflect the actual styles. Please see - https://prnt.sc/vfzuvv Maybe these is an event that can be tri...

artf

Thanks for the report and the suggestion Maryia. The fix will be available in the next release (I hope to publish it tomorrow)

#3077October 18, 2020by meyerco1 answer
0 reactions

BUG: on style manager panel , height/width properties did not reflect the right values

DescriptionThe bug is reproduced on the current demoWhat happens ?On Style Manager Panel height/width property input did not reflect the right values .Steps to reproduce on the demoOpen the import popup and paste this and click importSelect the labelOn Style Manager panel , under dimension sector , check the height/wi...

artf

Unfortunately, calculated height and width (like in this case, because are attached to the tag and not to a single class/id) can't be displayed properly so are excluded intentionally

#3075October 16, 2020by hellocaio3 answers
0 reactions

BUG: Unhandled Rejection (TypeError): i.classList is undefined

Hi. I updated GrapesJS to its current version 0.16.22 and I get an error on the callback function: editor.on("component:add", (model) => { editor.select(model); }); The error stack: Unhandled Rejection (TypeError): i.classList is undefined Stack: ./nodemodules/grapesjs/dist/grapes.min.js/</</w.toggleClass/</< nodemodu...

hellocaio

Never mind, problem solved by: editor.on("load", () => { editor.on("component:add", (model) => { editor.select(model); }); });

hellocaio

Ok, never mind the previous never mind. It worked a few times now I'm getting the same error. Sorry about that.

artf

Can you provide a demo, please?

#3072October 14, 2020by marcepoblet1 answer
0 reactions

BUG:

is there any way to set the size of the "blocks"? because in IE11 the size of the blocks look different. IE11: Firefox/EDGE/Chrome:

artf

CSS

#3071October 13, 2020by kuhelbeher2 answers
0 reactions

BUG: update listener triggered on initial load

Hello! I found weird bug with update listener. It's triggered on initial load if html code has <img> tag with class attribute: You can check live demo in this sandbox

artf

I'm not sure why it's happening but I'd not assign a high priority to the issue for 1 false-positive update. So, if anyone would like to help in debugging this I'd appreciate

artf

Shouldn't be an issue anymore

#3070October 9, 2020by mhowey3 answers
2 reactions

BUG / Feature? Applying background color to body component isn't part of the exported HTML.

Hi Art, thanks for creating such a fantastic project! I'm not sure if this would be considered a bug or feature request...but I'm having issues deciding how to hande the background color on the body while using the newsletter plugin with GrapesJS. Steps to Reproduce:Select the body (root element) in the canvas.In the...

JoshLucio

@mhowey I have seen this also, but I always assumed that the body is just the placeholder canvas for the content. Changes to the body do not export since the content placed in the body is the only thing being exported. In my application us...

artf

You can use this option

mhowey

Thanks for the reply @JoshLucio . I'm using the newsletter preset plugin, which I believe is more targeted toward HTML email, rather than site building. I was actually thinking what you said to be the case, and I've explored all the getWra...

#3069October 9, 2020by orosl3 answers
0 reactions

BUG: Style gone on link or nested text elements after exiting edit

Hello, I am editing legacy HTML with version 0.16.3 + newsleter-plugin. The style is stored inline (since the tool is used for authoring emails) and I use the feature componentFirst: true . I am facing a problem when trying to edit Component Text that has other text elements inside. Once I edit the text from the paren...

artf

Hi @orosl, thanks for the report. I was able to find and fix the bug so, it'll be available in the next release.

orosl

Hi @artf, thank you very much for your prompt response and release. I upgraded with the latest version 0.16.27. However I still encounter the problem, but with a slightly different behavior. I am not sure if I should open a new issue since...

artf

Thanks @orosl actually the fix was working with inner components but not with nested ones. I'll fix it in the next release