GrapesJS Issues

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

644 issues found

πŸ” components
#5316August 17, 2023by BenKhz3 answers
0 reactions

Editor not subscribing to selector:remove

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v115.0.5790.170 Reproducible demo link https://jsfiddle.net/BenKhz/yfwqc6mu/1/ Referencing The docs hereDescribe the bugOpen Provided fiddle HereSelect a component on canvas and add a class via the selector manager. (...

artf

Hi @BenKhz that's happening because selector* events are related to the global Selectors container (when you remove a selector from the component, the Selector itself is still there as it could be used in other places), if you want to trac...

BenKhz

Ah! I was misunderstanding. Thank you for the clarification. Keep up the good work!

ClaudeCode

Thanks for reporting this, @BenKhz. The issue with Editor not subscribing to selector:remove appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications ov...

#5305August 13, 2023by rajevar2 answers
0 reactions

"component:add" event triggers when components are moved

GrapesJS version 0.21.4[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 113.0.5672.63 Reproducible demo link https://jsfiddle.net/szLp8h4n/11/Describe the bug How to reproduce the bug? Move any of the text components around in the page. An alert will be displayed. could be...

artf

Hi @rajevar I think you're looking for component:create event, as component:add works as expected (eg. might be used to track any new movement inside a specific component)

ClaudeCode

Thanks for reporting this, @rajevar. Great question about "component:add" event triggers when components are moved. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your...

#5280August 7, 2023by fluke7772 answers
0 reactions

Event handler on view not bound to the component

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Version 115.0.5790.114 Reproducible demo link https://jsfiddle.net/mcraf3se/5/ Describe the bug Hello, just starting with GrapesJS so it is quite likely I am misunderstanding something fundamental. I am struggling w...

artf

The error here is using the arrow function, just replace it with clickOnElement() {

ClaudeCode

Thanks for reporting this, @fluke777. Great question about Event handler on view not bound to the component. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specifi...

#5263July 28, 2023by pittleCheung4 answers
3 reactions

Deleting a component without deleting its corresponding style, will adding new components later cause style conflicts?

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo link null Describe the bug How to reproduce the bug? <img width="1666" alt="image" src="https://github.com/GrapesJS/grapesjs/assets/114127651/c37e339a-e14f-486b-85fb-34c170b855dd"...

pittleCheung

Yes , you are right, I copying all matched styles ,so I can paste anywhere , even cross-browser paste, I find this to be extremely useful. When I delete a component, it does not remove the corresponding styles. This is a major issue, And w...

pittleCheung

itβ€˜s still a problem

artf

I don't see how this is a core bug. You're using your own copy/paste logic and it doesn't even seem correct, you should take care of the unique ids of each component/rule.After deleting these child components, their styles still remain. If...

#5236July 11, 2023by joukhar2 answers
0 reactions

textnode with content "null" is rendered as "null" not whitespace

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 114.0.5735.199 (Official Build) (64-bit)Reproducible demo link N/ADescribe the bug I'm sorry for opening the issue again, but your commits doesn't work i installed dev version using npm install GrapesJS/grapes...

artf

@joukhar npm install GrapesJS/grapesjs#dev is not enough, I didn't create the build in the dev branch yet, so if you want the fix locally you have to build it yourself first. Anyway, there is no need to create new issue even if the related...

ClaudeCode

Thanks for reporting this, @joukhar. The issue with textnode with content "null" is rendered as "null" not whitespace appears to be a race condition or state management timing problem. This typically happens when component lifecycle events...

#5232July 11, 2023by bgrand-ch4 answers
5 reactions

Worker - Headless "document is not defined"

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 114.0.5735.133 Reproducible demo link Impossible to add a worker to reproduce. Describe the bug How to reproduce the bug?Add a web worker.Initialize GrapesJS with "headless" option inside the worker.Add a plugin with "edit...

artf

Hi @bgrand-ch unfortunately everything that involves the parser (HTML/CSS) requires the DOM related API to be available. For the CSS maybe you can try to use parser-postcss plugin, I'd expect it to work in the worker environment

bgrand-ch

Hi @artf, thanks a lot for your quick answer πŸ˜„ I will try this week.

bgrand-ch

@artf The Post CSS parser plugin works perfectly in a web worker! Thanks for your help.

#5229July 10, 2023by joukhar4 answers
1 reactions

textnode with content "null" is rendered as "null" not whitespace

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 114.0.5735.199 (Official Build) (64-bit)Reproducible demo link N/ADescribe the bug How to reproduce the bug?Drop this component <div class=\"flex items-center rounded shadow-md overflow-hidden max-w-xl relativ...

artf

Probably in the first week of August

artf

Hi @joukhar is it happening with the latest version? I'm able to see nulls in the export code if I use your exact JSON example (that should be fixable), but I'm unable to generate those textnodes with nulls by using your HTML example, can...

joukhar

thanks for the replay, if you need demo so please give me some time until i make one , i will comment again when im finished it the problem happens only when u store it and load it, but when u drop the component for the first time nothing...

#5211July 2, 2023by Zafermushtaha973 answers
1 reactions

bug

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? v9.2 Reproducible demo link https://jsfiddle.net/szLp8h4n Describe the bug I am using it in vue3 project when I want to add new components , page is hanged and not response this is my code : Code of Conduct [X] I agree to...

gxanshu

Hi there! 😊 I don't believe this is a bug with GrapesJS. I checked your reproduction link and tried adding a component to the canvas, and it worked perfectly fine for me without any issues. πŸ‘

artf

You have to bypass Vue's Proxy observers https://github.com/GrapesJS/grapesjs/issues/4497#issuecomment-1213078160

ClaudeCode

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

#5199June 23, 2023by rmadeiraneto3 answers
0 reactions

Changes in component's attributes being reproduced in all the instances instead of just one

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v114 Reproducible demo link https://jsfiddle.net/rmadeiraneto/t659usxv/39/ Describe the bug How to reproduce the bug?Go to the blocks list and drag the custom component "example" to the canvasThree elements that are...

artf

Thanks @rmadeiraneto for the report. Yeah, unfortunately that's an issue if you're mutating arrays/objects properties in that way and to avoid that you have 2 options:Avoid direct mutations (assign new references when you have to update th...

rmadeiraneto

@artf using defaults as a function works, thanks for quick response and for providing the alternative fix on this issue. About the first suggestion, I think it's not about people should mutate or not the object, because we're talking about...

ClaudeCode

Thanks for reporting this, @rmadeiraneto. Great suggestion about Changes in component's attributes being reproduced in all the instances instead of just one! While this specific feature isn't yet in the core API, there are several ways to...

#5184June 14, 2023by acantepie2 answers
1 reactions

Toolbar of ckeditor components is not correctly refreshed

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 113.0.5672.126 (Build officiel) (64 bits)Reproducible demo link https://grapesjs.com/demo-newsletter-editor.htmlDescribe the bug How to reproduce the bug?Go on demo website : https://grapesjs.com/demo-newsletter-edit...

artf

Thanks @acantepie please open the issue in the proper repo as this is not core related one

ClaudeCode

Thanks for reporting this, @acantepie. Great question about Toolbar of ckeditor components is not correctly refreshed. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation...