GrapesJS Issues

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

466 issues found

πŸ” components
#6263Oct 24, 2024by yashvi20264 answers
1 reactions

Duplicated links are added using rte

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeReproducible demo link https://codepen.io/Harshsne/pen/xxoOyXODescribe the bug How to reproduce the bug?add link to a word using rte, link component is added Now type something after the link component without space an...

sirbeagle

Alight - the only bad part is we may never know what the fix ended up being. @artf - I think we can close out this issue.

sirbeagle

So I've been playing around with this quite a bit and I can reproduce the error on the Codepen that @yashvi2026 provided. My steps to reproduce (most of the time) are very similar: Type two words with numerous spaces in between in a text b...

yashvi2026

Yes.After upgrading to latest version ,this issue doesnt occur.

#6260Oct 24, 2024by hr12012 answers
0 reactions

An error when I use component:clone in a component

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Microsoft Edge 130.0.2849.46Reproducible demo link https://jsfiddle.net/uwybfd98/Describe the bug How to reproduce the bug?select the carousel componentclick the space in the upper right or lower left corner of the image and...

artf

@hr1201 onRender could be triggered many times, you should never attach listeners there if you don't clean up the properly. Your logic is also purely model related so it shouldn't even be in the view, just move your code in the model.init...

GJS Helper

The issue you're experiencing with recursive component:clone events and editor jams stems from how event listeners are attached within your custom component's view.onRender method. Let's break down the root cause and provide a robust solut...

#6250Oct 23, 2024by maxming23332 answers
0 reactions

Clone page prompt 'Converting circular structure to JSON'

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 129.0.6668.101Reproducible demo link https://grapesjs.com/demoDescribe the bug How to reproduce the bug? open https://grapesjs.com/demo run this script in DevTools: What is the expected behavior? Successfully copied w...

maxming2333

In addition to the above method, is there any other way to copy the page?

GJS Helper

The TypeError: Converting circular structure to JSON you're encountering when cloning a GrapesJS page's main component and adding it to a new page is a common issue related to how GrapesJS components are serialized for storage. This happen...

#6211Oct 11, 2024by jlafosse4 answers
0 reactions

Too much recursion

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 131.0.2 Reproducible demo link https://grapesjs.com/demo-newsletter-editor.html Describe the bug How to reproduce the bug?Go to the grapesjs demo, then import the following html:Open your browser console.Rapidly cl...

artf

Hey @jlafosse thanks for the report. I'd not expect that issue with the latest version: <img width="123" alt="Screenshot 2024-10-21 at 19 00 04" src="https://github.com/user-attachments/assets/ff074a31-cd19-4547-bb27-596c92e16d64"> Can you...

jlafosse

Indeed, that appears to have fixed the issue! Thank you!

artf

πŸ™Œ closing then, thanks πŸ™‡β€β™‚οΈ

#6202Oct 9, 2024by klipto-inc2 answers
0 reactions

Javascript CDN not working on grapejs canvas

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? 129 Reproducible demo link https://grapesjs.com/demo Describe the bug const newEditor = grapesjs.init({ fromElement: true, // Allow components from HTML container: "#editor", canvas: { scripts: [ "https://cdn.jsdelivr.net/...

artf

@klipto-inc please create the bug report with a proper reproducible live demo

GJS Helper

The issue you're encountering with Preline.js not working on the GrapesJS canvas, despite being included via canvas.scripts, is a common timing problem with UI libraries that rely on DOMContentLoaded for initialization. Root Cause Many Jav...

#6152Sep 18, 2024by stpp24 answers
1 reactions

CSS added via custom code persists after custom code component is removed

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesjs.com/demo Describe the bug How to reproduce the bug?Add custom code component with HTML + CSSDelete custom code component. What is the expected behavior? All code should be remove...

artf

This is not related to the core and should be addressed at the plugin level. Please create the issue there and we'll try to figure out the right approach.

mosh-tudor

@stpp2 This is not really a bug; it's more of a feature. :) Try using clearStyles: https://github.com/GrapesJS/grapesjs/blob/d48e1e34a9fa363dcb83fdcca53a89563db17063/packages/core/src/editor/config/config.ts#L260-L272

stpp2

Yeah clearStyles is already enabled in my case, but that doesn't seem to work well in many cases. Either way I'd expect the Custom Code component to be somewhat "containerized" so it's not leaving anything in the doc when removed.

#6143Sep 10, 2024by rhoenerSBS2 answers
0 reactions

BUG/[QUESTION]: How to correctly wrap a Component on add/mount?

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v128 Reproducible demo link https://jsfiddle.net/fjyk6n4a/2/ Describe the bug Hi @artf, I am currently trying to wrap a component in a section component if its has not been wrapped yet. I am hooking into the compone...

jasonvijayy

Hi @artf, Reproducible Link I’m also hitting a crash when using component.replaceWith() together with UndoManager. This only happens when replaceWith() is triggered during editor lifecycle events (e.g. change:status, component:selected, co...

GJS Helper

The issue you're facing with the UndoManager stack becoming inconsistent after wrapping a component using component.replaceWith inside the component:mount event is a common challenge when modifying the editor's state in a way that doesn't...

#6142Sep 10, 2024by rhoenerSBS2 answers
0 reactions

Redo of Pages not working properly

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v128 Reproducible demo link https://app.grapesjs.com/studio Describe the bug After adding a Page, removing it with undo and adding back with redo, the page is not working properly. The Layer Manager does not update...

artf

Thanks for the report @rhoenerSBS

GJS Helper

This is indeed a bug in GrapesJS's undo/redo mechanism, specifically when handling page additions and removals. The behavior you've described is consistent with an incomplete restoration of the page's internal state after a 'redo' operatio...

#6122Sep 4, 2024by mohamedsalem4013 answers
3 reactions

Fix and refactor Sorter.ts

[x] Fix the Sorter usage in StyleManager (regression with sorting property layers) [x] Refactor Sorter with the usage of Components.canMove [x] Update canMove with the check of dropping main Symbol inside its own instance.

mohamedsalem401

This's done.

mohamedsalem401

The idea is to refactor the sorter for improved maintainability and readability. We can implement the following changes:Make Sorter class depend on an abstract tree structure rather than relying on specific implementations like Component o...

GJS Helper

This fix and refactoring addresses several key areas within GrapesJS's Sorter.ts and component movement logic, resolving a regression in the Style Manager and enhancing the overall drag-and-drop experience, especially concerning reusable c...

#6102Aug 31, 2024by Alababdiy3 answers
5 reactions

Traits Not Displayed After Reloading Editor for Custom Component

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 91VReproducible demo link https://jsfiddle.net/8tsj5vpb/Describe the bug I'm encountering an issue with GrapesJS where traits defined for a custom component are not being displayed after reloading the editor. The trai...

mohamedsalem401

@Alababdiy I was unable to reproduce the issue using the link provided. However, it seems like the issue is that GrapesJS doesn't allow adding or defining a component after it has been initialized.

mohamedsalem401

Hey @Alababdiy, I wasn't able to reproduce the issue you described in the JSFiddle.

GJS Helper

You've encountered a common issue related to how GrapesJS persists and re-identifies custom components after reloading the editor. The traits for your custom component disappear because GrapesJS is not correctly re-associating the loaded c...

Browse all topics