GrapesJS Issues

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

3464 issues found

#4861January 21, 2023by edenizk2 answers
1 reactions

BUG: <br/> is adding to single line text, after entering space for the first time in firefox

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox Reproducible demo link https://jsfiddle.net/8rm5wv2y/1/ Describe the bug How to reproduce the bug?open example page in firefox (it has no modification)click show code, you will see that there is no <br/> element in...

artf

Unfortunately this is not related to grapesjs itself but how Firefox handles editable text. I guess one option would be to switch to some custom rich text editor which doesn't rely on the native behaviour.

edenizk

Thank you for your answer 🙂

#4859January 20, 2023by zoilorys1 answer
0 reactions

BUG: Editing CSS property sets a style to a common class instead of element

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v108Reproducible demo link https://grapesjs.com/demo.htmlDescribe the bug How to reproduce the bug?Setup grapesjs editorImport following template https://pastebin.com/d9S2M0iSAt the very bottom of the template you wil...

artf

You just need to enable this option: https://grapesjs.com/docs/modules/Selectors.html#component-first-selectors

#4855January 19, 2023by ronaldohoch3 answers
1 reactions

BUG: Outline disappears after applying loadProjectData

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Brave last version Reproducible demo link https://grapesjs.com/demo Describe the bug How to reproduce the bug?Open the demo pageOpen the developer toolsRun: let projectData = editor.getProjectData()Run: editor.DomComponent...

allenhwkim

@ronaldohoch with Edge browser, it works with the command you provided. let projectData = editor.getProjectData(); editor.DomComponents.clear(); editor.loadProjectData(projectData); I don't think GrapesJS support Brave browser, which is no...

ronaldohoch

I also run the command editor.runCommand("core:component-outline") and it didn't shows again, i needed to click on the button twice to make it appear

ronaldohoch

Hi @allenhwkim, thanks for the comment. But embarrassing I didn't test it in other browsers. I believe my customers don't use Brave, so I'm going to drop that part. However, doing all these tests, I managed to make it work the way I want,...

#4854January 19, 2023by mnutt3 answers
1 reactions

BUG: export 'default' not found in 'backbone' (module has no exports)

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 109 Reproducible demo link none Describe the bug How to reproduce the bug? What is the expected behavior? The development server starts. What is the current behavior? I'm using node v16.18.1 (MacOS) although had th...

mnutt

Yes, I'm able to reproduce it on grapesjs-style-filter too, same types of errors.

mnutt

I was able to circumvent this error by changing the build pipeline to output more modern javascript (via --targets="> 3%"), though that produces backbone errors due to the use of es6 classes.

artf

I'm not able to reproduce on my side with a fresh install, are you using the dev branch?

#4851January 17, 2023by chaegumi2 answers
0 reactions

BUG: this.on('change:attributes:type', this.handleTypeChange) do not support array type

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 108.0.5359.125Reproducible demo link https://codesandbox.io/s/frosty-darkness-7po7xlDescribe the bug How to reproduce the bug?use myBlockclick test button What is the expected behavior? this.on("change:list1", this.ha...

artf

Listeners don't see deep changes so you have to create a new array in that case

chaegumi

Thanks @artf. I use JSON.stringify and JSON.parse to deal my data.

#4848January 16, 2023by NicoGGG1 answer
1 reactions

BUG: Component content is set to empty string after inline editing

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox v91.4.1 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Go to the grapesjs basic demo: https://grapesjs.com/demo.htmlClear the canvasAdd a component LinkExecute edito...

artf

This is expected due to some logic related to the rich text editor. You can use component.getInnerHTML() to get the inner HTML or component.components() to get inner components.

#4847January 15, 2023by wunksert2 answers
0 reactions

BUG: Css edits aren't persisted to the DOM

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 109.0.5414.87 Describe the bug How to reproduce the bug?Create a @keyframes animation on the GrapesJS canvasIn JS, create a new CssRule by passing the following string into editor.Css.addRules:Add it to the ca...

artf

Seems to be related to CssGroupRuleView here. In case of at-rules like @keyframes we have to force the re-render of the parent container.

wunksert

@artf facing this issue again with editor.CssComposer.remove(myCssRule) the editor css removes the rule but it's not flushed through to the DOM. How to you recommend I force re-render of the DOM while keeping the state of my editor intact?...

#4841January 14, 2023by chaegumiNo answers
0 reactions

BUG: do not use component.addAttributes({[traitName]:value}), you should use component.set(traitName, value) sometimes

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 108.0.5359.125 Reproducible demo link https://codesandbox.io/s/sweet-hugle-w00pqx Describe the bug How to reproduce the bug?drag my blockview code What is the expected behavior? do not want trait2="trait2" What is t...

#4837January 10, 2023by quentin-bettoum3 answers
4 reactions

BUG: HTML elements ids are incremented on different pages loaded in projectData

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 109 Reproducible demo link https://grapesjs.com/demo.html Describe the bug Hello, I noticed that when I load multiple pages in the projectData that have the same id used in the HTML, grapes will automatically incre...

artf

hey @bgrand-ch I think one day all grapesjs entities will have a global uid, so in long-term, I'd expect this issue to be fixed 🤞

quentin-bettoum

At first, I wanted to generate all the pages together to have a single CSS output for all the pages. But now I'm trying another solution for the styles. So for the id problem, generating each page separately could be a solution. Thanks for...

bgrand-ch

Grapes to use some data attributes (something like data-grapes-id) as unique identifiers to leave the id free for some frontend scripts. I like this idea 💯

#4817January 2, 2023by sdimitrenco1 answer
0 reactions

BUG: Can't edit text node inside div, if div has inside tag p > span.

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 108.0.5359.125, Mozilla 107.0Reproducible demo link https://jsfiddle.net/stanislavdimitrenko/d61cm4yg/14/Describe the bug So, that strange behavior of grapes js. If you have that struct "Some text without the...

artf

Yeah right now this is an expected behaviour for parsed text nodes without proper wrappers and not textable components as siblings. So in order to make those nodes editable you have to properly wrap them in a tag like span.