GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#6180September 30, 2024by padcom3 answers
1 reactions

BUG: Trait's `setValue()` method not called when value changes

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome latest Reproducible demo link https://codesandbox.io/p/sandbox/withered-rgb-xmw8gk Describe the bug How to reproduce the bug?Open code sandboxSelect "body" (type: 'wrapper') - observe alert about getting value from...

padcom

Thank you! I verified and it is working as expected!

padcom

From what I can see the Trait.setValue() is not called when the value comes from an input. Instead the setTargetValue() is called which doesn't check if the setValue() method of the trait definition is there. Also, the Trait.setValue() che...

padcom

I tried following this discussion to get it working but as you can see in the sandbox it just doesn't work.

#6172September 25, 2024by yashvi20261 answer
0 reactions

BUG: Need dark theme support in editor

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link --- Describe the bug It would be great if you add theme switching in the editor, allowing me to toggle between dark and light themes based on my preference.Code of Conduct [X] I agree to follo...

artf

Please use the discussions instead of bug issues

#6171September 24, 2024by rhoenerSBS1 answer
0 reactions

[Question]: Track custom storable with UndoManager

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v129 Reproducible demo link not applicable Describe the bug HI @artf, I am currently implementing an editor with grapesjs in which it is possible to add chapters alongside the already existing pages. I implemented a...

artf

Hey @rhoenerSBS please avoid opening bug issues for questions.

#6152September 18, 2024by stpp23 answers
1 reactions

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

#6143September 10, 2024by rhoenerSBS1 answer
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...

#6142September 10, 2024by rhoenerSBS1 answer
0 reactions

BUG: 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

#6122September 4, 2024by mohamedsalem4012 answers
3 reactions

[Fix] 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...

#6116September 3, 2024by SamMousa3 answers
4 reactions

BUG: asDocument not working as expected

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 128 Reproducible demo link https://jsfiddle.net/sammousa/bxgsdc12/11/ Describe the bug How to reproduce the bug?Load an HTML string with a non empty <head>, using the option {asDocument: true}.Export the data via ed...

SamMousa

Thank you, but that's not really the point. I'm fully able to make a workaround, but that does not fix the bug. The bug is that an export via getProjectData() followed by an import via loadProjectData() should result in the same state. Fur...

artf

The bug is that an export via getProjectData() followed by an import via loadProjectData() should result in the same state. Yeah definitely not expected, we'll look into it. Appreciate the easily reproducible steps on the demo πŸ‘

artf

Thanks @SamMousa detailed bug reports are always welcome. If a direction is requested, we're happy to guide you πŸ™‡β€β™‚οΈ

#6102August 31, 2024by Alababdiy2 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.