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?tsup-node src/index.ts --format esm,cjs --legacy-output --watch What is the expected behavior? I use vite to build grapesjs Wha...
artf
I think you have to address that to Vite community, the core is using webpack right now and it works as expected
GJS Helper
The error "Uncaught Error: Dynamic require of "codemirror/lib/codemirror" is not supported" arises when you're trying to bundle GrapesJS (or a library that uses GrapesJS) with a modern bundler like tsup (especially when targeting ESM) that...
On smaller laptop screens (macbooks for example), the border of images and some elements are in the wrong position (when i click to move or resize an image) I am not having this issue when the editor gets rendered on bigger screens. I am not sure if there is a config step that i'm missing. Can anyone please assist? Is...
artf
@saharelhage please avoid converting discussions to issues. The GitHub Issues should only be created from here by properly following the template.
GJS Helper
The issue you're experiencing with the selection and resize borders appearing in the wrong position on smaller screens, particularly MacBooks, is a common problem often related to how browsers render content under different scaling conditi...
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...
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.
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...
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...
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...
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...
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
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...