GrapesJS Issues

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

466 issues found

πŸ” components
#4851Jan 17, 2023by chaegumi3 answers
0 reactions

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.

GJSBlock

Thanks for reporting this, @chaegumi. Great question about this.on('change:attributes:type', this.handleTypeChange) do not support array type. The recommended approach with Components is to use the event-driven API. Start here: Check the G...

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

#4841Jan 14, 2023by chaegumi1 answer
0 reactions

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

GJSBlock

Thanks for reporting this, @chaegumi. Great question about do not use component.addAttributes({[traitName]:value}), you should use component.set(traitName, value) sometimes. The recommended approach with GrapesJS is to use the event-driven...

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

#4812Dec 27, 2022by FaisalShaikhHA2 answers
1 reactions

Layerable property not working as expected in parent-child scenario.

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 107.0.5304.110 (Official Build) (arm64) Reproducible demo link https://codepen.io/faisal-praella/pen/rNvOwgR Describe the bug When the parent component is set to layerable: false it is not visible & all its child not visib...

artf

Unfortunately this is how layerable currently works so it's not a bug, but I'd be glad to accept a PR to improve this behaviour.

GJSBlock

Thanks for reporting this, @FaisalShaikhHA. The issue with Layerable property not working as expected in parent-child scenario. appears to be a race condition or state management timing problem. This typically happens when component lifecy...

#4803Dec 25, 2022by miladmeidanshahi1 answer
0 reactions

Traits value type select doesn't fill value

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 108 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug? Use the tooltip component and get Traits via editor.getSelected().getTraits() as you can see data-tooltip-length v...

GJSBlock

Thanks for reporting this, @miladmeidanshahi. Great question about Traits value type select doesn't fill value. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your...

#4801Dec 23, 2022by eduardocalixtokorp2 answers
1 reactions

React components componentWillUnmount is not called

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 108.0.5359.125 (Windows)Reproducible demo link https://codesandbox.io/s/white-meadow-o56l2d?file=/src/Chart/Chart.js:135-254 This demo is not in the latest grapesjs version, but locally, using the latest version, I ha...

eduardocalixtokorp

I've noticed that in my component definition I was doing reactRoot.render(<>{reactEl} </>) in onRender() then, I was missing to add root.unmount() n remove() method

GJSBlock

Thanks for reporting this, @eduardocalixtokorp. Great question about React components componentWillUnmount is not called. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation...

#4800Dec 23, 2022by usmanqamar-int2 answers
0 reactions

Removing or adding component changes other components locations with dragMode translate, any solution please?

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://zmzr3n.csb.app/ Describe the bug How to reproduce the bug? While deleting or adding more than one component, other components have changed their position. What is the expected behavior...

artf

This is how translate works, the alternative is to use absolute mode

GJSBlock

Thanks for reporting this, @usmanqamar-int. Great question about Removing or adding component changes other components locations with dragMode translate, any solution please?. The recommended approach with Components is to use the event-dr...

#4796Dec 21, 2022by RakulAgn2 answers
0 reactions

Custom Traits not Updating if using mjml

This Method Works Fine for Normal HTML. But When I Tried With MJML For MJ-IMAGE Tag The Src is Updated in TR Tag but not updated in img tag inside the TR tag The Below Image Originally posted by @RakulAgn in https://github.com/artf/grapesjs/discussions/4795

artf

@RakulAgn please avoid creating issues from discussions.

GJSBlock

Thanks for reporting this, @RakulAgn. Thanks for sharing your report about Custom Traits not Updating if using mjml. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Yo...

#4792Dec 19, 2022by wunksert4 answers
0 reactions

Drag and drop broken in 20.2

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v108Reproducible demo link see belowDescribe the bug How to reproduce the bug?Create a custom componentAdd it to the editor as a component and draggable blockSet the editor to absolute drag mode when the component add...

wunksert

Confirmed it's still working in v0.20.1, so it looks like the regression was introduced in v0.20.2

wunksert

The component is no longer draggable once it's added to the canvas either.

artf

I'll prepare a fix for the next release.

Browse all topics