GrapesJS Issues

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

877 issues found

πŸ” question
#5280Aug 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() {

GJS Helper

The issue you're encountering with this being window or undefined inside your custom component's view event handler is a common JavaScript this binding problem, especially when using arrow functions. It's not a bug in GrapesJS but rather a...

#5274Aug 3, 2023by wunksert4 answers
1 reactions

Parser bug inside Remix

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v114 Reproducible demo link https://github.com/wunksert/remix-grapes-error/tree/main Describe the bug How to reproduce the bug?Clone repo abovenpm inpm run dev you'll see that the grapes iframe and boilerplate is re...

artf

@wunksert it seems like the editor initializes on itself multiple times, are you properly clearing the editor instance with destroy (eg. in your useEffect)?

wunksert

It might turn out that a fix for this is more simply solved by me editing structure or naming conventions in my project. Happy to do that if it's faster than changing something in GrapesJS core.

artf

yeah definitely not related to the core

#5269Aug 2, 2023by sannila1 answer
0 reactions

Object literal may only specify known properties, and 'el' does not exist in type 'PanelProps'.

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 115.0Reproducible demo link https://jsfiddle.net/varyqjo7/Describe the bug How to reproduce the bug?Create a new Angular project (version 16.1.3)Install grapesjs latest version (npm i grapesjs)Add css and js in angula...

GJS Helper

The issue you're encountering, "Object literal may only specify known properties, and 'el' does not exist in type 'PanelProps'", is a TypeScript compilation error. It indicates that the el property is not a valid or recognized property wit...

#5268Aug 2, 2023by SLain1233 answers
0 reactions

Autoplay for youtube or vimeo doesn't work

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v115 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Drag and drop video component to canvas.Select youtube or vimeo and add video id.Activate autoplay checkbox.Publis...

SLain123

I can fix the bug myself, but I can't push my branch with fix to repo. It seems like I don't have permission for pushing or create new branch.

artf

@SLain123 you have to create a PR from your fork https://stackoverflow.com/questions/38918942/pull-request-from-a-different-repository

GJS Helper

The issue you're experiencing with YouTube and Vimeo autoplay not working in GrapesJS is not a bug in GrapesJS itself, but rather a consequence of modern browser autoplay policies. Browsers like Chrome, Firefox, and Safari have implemented...

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

#5249Jul 24, 2023by pittleCheung3 answers
0 reactions

Editor?.Css.addRules(targetCss);

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? editor?.Css.addRules(targetCss); What is the expected behavior? editor?.Css.addRules(targetCss); it add style at end <img widt...

artf

This is not a bug, Css.addRules doesn't have any option argument. You can open a discussion in regard to this topic and we can see if it makes sense to introduce it

pittleCheung

ok, I get it,I need to add some styles in front of an array, not at the end. such as arr.unshift(css) How can I do that? I might need a little help from you

GJS Helper

The behavior you're observing with editor.Css.addRules() is actually the expected and intended functionality of the GrapesJS CSS API. By default, when you use editor.Css.addRules(targetCss);, the new CSS rules are appended to the end of th...

#5245Jul 16, 2023by riteshdalal4 answers
0 reactions

Contents of component with editable:false are still editable

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 114.0.5735.198 Reproducible demo link https://jsfiddle.net/riteshdalal/obnx7sg3/22/ Describe the bug How to reproduce the bug?Create a component with editable:false in the modelDrop the component on the canvas What...

artf

The editable property has no meaning by default and it's only used internally by other extended components like Text or Image

riteshdalal

@artf how do we create a component such that gjs does not parse the children.

riteshdalal

The editable property has no meaning by default and it's only used internally by other extended components like Text or Image This used to work on older versions of GJS. Just stopped working in 0.21.3

#5241Jul 14, 2023by hanzuken2 answers
0 reactions

Element absolute position is different from Cursor position when moving in the zoomed canvas

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome version 114.0.5735.199 (Official Build) (64-bit) Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Enable the absolute drag mode editor.editor.set('dmode', 'absolute')Se...

artf

Issues related to Absolute mode are tracked here https://github.com/GrapesJS/grapesjs/issues/3770

GJS Helper

You've accurately identified a common issue in GrapesJS related to absolute positioning and canvas zoom. This is indeed a bug where the drag operation's delta calculation doesn't account for the canvas's current zoom level, leading to a di...

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

GJS Helper

Thank you for reporting this issue and providing detailed insights into the relevant code sections. You've correctly identified the root cause of the problem. Root Cause Analysis: The issue stems from how JavaScript's textContent property...

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

Browse all topics