GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

220 issues found

πŸ” canvas
#4940Feb 21, 2023by mani-rai2 answers
0 reactions

Destroying and re-initializing produces "Cannot read properties of undefined (reading 'get')"

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Google Chrome Version 110.0.5481.100 (Official Build) (64-bit) Reproducible demo link https://stackblitz.com/edit/js-3urscf?file=index.html,index.js Describe the bug How to reproduce the bug?Initialize the editorDestroy th...

artf

Yeah, the editor instance is not expected to be destroyed immediately due to some deferred async functions (eg. for the StorageManager) but that can be fixed. For now you can overcome the issue by doing something like this:

GJSBlock

Thanks for reporting this, @mani-rai. Great question about Destroying and re-initializing produces "Cannot read properties of undefined (reading 'get')". The recommended approach with ProseMirror is to use the event-driven API. Start here:...

#4906Feb 6, 2023by panditlakshya2 answers
0 reactions

Grapesjs fails to recognize component types when setting innerHTML through script.

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome v108.0.5359.98 Reproducible demo link https://codesandbox.io/s/grapes-js-template-literal-forked-6kgvrb?file=/src/App.js Describe the bug I'm trying to create a custom component that recognizes inner html component...

artf

Read carefully this guide, everything inside script is outside of the editor scope. You can update the component itself by using component.components method or specify the components: '<div ....' directly in definition.

GJSBlock

Thanks for reporting this, @panditlakshya. Great question about Grapesjs fails to recognize component types when setting innerHTML through script.. The recommended approach with Canvas is to use the event-driven API. Start here: Check the...

#4848Jan 16, 2023by NicoGGG2 answers
1 reactions

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.

GJSBlock

Thanks for reporting this, @NicoGGG. Great question about Component content is set to empty string after inline editing. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for...

#4847Jan 15, 2023by wunksert3 answers
0 reactions

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?...

GJSBlock

Thanks for reporting this, @wunksert. Great question about Css edits aren't persisted to the DOM. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific mod...

#4837Jan 10, 2023by quentin-bettoum4 answers
4 reactions

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 πŸ’―

#4771Dec 7, 2022by henry-mmw3 answers
0 reactions

GrapesJS doesn't understand '@-webkit-keyframe' CSS rules.

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v108 Reproducible demo link no link Describe the bug Add any '@-webkit-keyframe' CSS rules into the editor. Appears as '@media' instead. I've added a fair few tools to the builder now and it seems whenever I add any...

ronaldohoch

I just came here to open the same issue! :( @artf, you can add this code to check it.

artf

Reported and fixed here

GJSBlock

Thanks for reporting this, @henry-mmw. The issue with GrapesJS doesn't understand '@-webkit-keyframe' CSS rules. appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and...

#4763Dec 1, 2022by quentin-bettoum2 answers
0 reactions

_undoexc status open

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Firefox 106Reproducible demo link https://grapesjs.com/demo.htmlDescribe the bug Hello, When I upgraded from 0.19.5 to 0.20.1, I noticed that the page's JSON that I get using editor.getProjectData() is significantly heavier...

artf

Oh yeah, that should be removed, thanks.

GJSBlock

Thanks for reporting this, @quentin-bettoum. Great question about _undoexc status open. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look fo...

#4754Nov 30, 2022by jasonliang-dev2 answers
0 reactions

Closing `</script>` tag not escaped for script properties

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 107.0.5304.122 (64-bit) Reproducible demo link https://jsfiddle.net/j5khz1gm/ Describe the bug How to reproduce the bug?Create a custom component type with the following default properties:Add the custom com...

derciesto

@jasonliang-dev any update on this? i facing same issue.

GJSBlock

Thanks for reporting this, @jasonliang-dev. Great question about Closing </script> tag not escaped for script properties. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentati...

#4739Nov 20, 2022by hemaltandel12 answers
0 reactions

Css class name with '/' converted to '-'

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Edge Version 107.0.1418.52 (Official build) (64-bit)Reproducible demo link https://codesandbox.io/s/peaceful-glade-rbfbwt?file=/src/app/app.component.tsDescribe the bug How to reproduce the bug?Create new app with grapejscal...

artf

You should still be able to use the escapeName option

GJSBlock

Thanks for reporting this, @hemaltandel1. Great question about css class name with '/' converted to '-'. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific mo...

#4727Nov 12, 2022by dreamsight1 answer
0 reactions

NO NEED anyone can reproduceDescribe the bug

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 107.0.5304.107 (Official Build) (64-bit) ChromeReproducible demo link NO NEED anyone can reproduceDescribe the bug when saving HTML and CSS the program formats Converts CSS i.e. "@keyframes slide {" TO "@media slide{...

GJSBlock

Thanks for reporting this, @dreamsight. The issue with * appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent stat...

Browse all topics