GrapesJS Issues

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

30 issues found

πŸ” undo-manager
#5641Jan 24, 2024by yashvi20262 answers
0 reactions

Undomanager.remove() not working

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v91Reproducible demo link https://codepen.io/Harshsne/pen/WNgZzPEDescribe the bug How to reproduce the bug?Append an image to the canvas and close the image modal.(so that component will be removed from tracking as i...

artf

The problem here is not Undomanager.remove but what is tracked. When you're resizing the image, you're not editing the Component itself but its CssRule object so that's why it's not working as expected. I'd probably suggest to simply skip...

GJS Helper

The issue you're encountering with editor.UndoManager.remove() not preventing the undo of a component's removal is due to a misunderstanding of how the UndoManager operates in this specific context. The UndoManager.remove(component) method...

#5632Jan 20, 2024by Harshsne262 answers
0 reactions

Add a change to the undomanager

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v91 Reproducible demo link https://codepen.io/dhanadsp1120/pen/ExrRvOB Describe the bug How to reproduce the bug? 1.Disable the undo manager by invoking um.stop(). 2.Make alterations to the content. 3.Re-enable the...

artf

When the undo manager resumes, any modifications made after its pause should be treated as a single change. This ensures that clicking "undo" will revert the entire set of alterations to the state prior to the undo manager's interruption....

GJS Helper

The issue you're encountering is expected behavior for the GrapesJS UndoManager. When um.stop() is called, the UndoManager ceases to listen for editor changes. Consequently, any modifications made during this period are not recorded in its...

#5631Jan 19, 2024by Harshsne262 answers
0 reactions

Undo manager add() not working as expected

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v91 Reproducible demo link -- Describe the bug How to reproduce the bug? I wanted to add an change to the undomanager stack . var components = editor.Components; editor.UndoManager.add(components.getComponents().mod...

artf

@Harshsne26 you need to provide a reproducible demo for a bug

GJS Helper

The issue you're encountering with editor.UndoManager.add() not working as expected stems from a misunderstanding of the method's intended use and the type of argument it expects. The GrapesJS UndoManager is designed to track changes to th...

#5530Nov 25, 2023by Harshsne261 answer
0 reactions

Undo manager start and stop doesnt work as expected

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v91 Reproducible demo link https://codepen.io/dhanadsp1120/pen/ExrRvOB Describe the bug How to reproduce the bug?Disable the undo manager by invoking um.stop().Make alterations to the content.Re-enable the undo mana...

GJS Helper

The issue you've described with the GrapesJS Undo Manager (um.stop() and um.start()) is a known behavior where the um.stop() method, despite setting the internal enabled flag to false, doesn't consistently prevent all internal GrapesJS ope...

#5325Aug 21, 2023by bohwaz1 answer
0 reactions

Undo (Ctrl+Z) is not cancelling browser keyboard shortcut

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Vivaldi Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Press Ctrl+Z after doing an action, to undo itThe action is reversed, but my browser also reopens the last closed tab...

GJS Helper

The issue you're experiencing with Ctrl+Z triggering both GrapesJS undo and the browser's "reopen last closed tab" shortcut is due to the keydown event for Ctrl+Z not having its default action prevented within GrapesJS. While GrapesJS hand...

#4972Mar 12, 2023by FaisalShaikhHA1 answer
0 reactions

Checkbox trait not getting checked or unchecked on undo/redo actions.

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 110.0.5481.177 (Official Build) (arm64) Reproducible demo link https://grapesjs.com/demo.html Describe the bug What is the current behavior? Checkbox trait not getting checked or unchecked on undo/redo (trait value...

GJSBlock

Thanks for reporting this, @FaisalShaikhHA. The issue with Checkbox trait not getting checked or unchecked on undo/redo actions. appears to be a race condition or state management timing problem. This typically happens when component lifec...

#4947Feb 27, 2023by FaisalShaikhHA4 answers
2 reactions

Undo manager not working properly on undoing a remove action

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome - version 110.0.5481.100 (Official Build) (arm64)Reproducible demo link https://codepen.io/faisal-praella/pen/ExeNwxJDescribe the bugI have added a custom columns component with a number trait name columns used for ad...

artf

Yeah undo triggers the change:columns, in your case you could try to wrap your updateColumns changes in editor.UndoManager.skip.

artf

Ok I'm closing this one then and please open a new bug issue related to checkbox traits.

FaisalShaikhHA

Thank you @artf it works, to fix this I was toggling the trait change listener by listening to undo command before & run events but this feels cleaner. The checkbox trait not getting checked or unchecked on undo/redo (trait value is update...

#4763Dec 1, 2022by quentin-bettoum2 answers
0 reactions

_undoexc status open

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Firefox 106Reproducible demo link https://grapesjs.com/demo.htmlDescribe the bug Hello, When I upgraded from 0.19.5 to 0.20.1, I noticed that the page's JSON that I get using editor.getProjectData() is significantly heavier...

artf

Oh yeah, that should be removed, thanks.

GJSBlock

Thanks for reporting this, @quentin-bettoum. Great question about _undoexc status open. The recommended approach with ProseMirror is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look fo...

#4699Oct 31, 2022by DhanaDSP11202 answers
0 reactions

Undo not working properly on InsertHTML in text block

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome v107 Reproducible demo link https://jsfiddle.net/4vacxuw2/2/ Describe the bug I added an custom toolbar to insert some value in current position through rte.insertHTML options ,it works good. But when try to undo (c...

artf

Hi @DhanaDSP1120 yeah unfortunately that is expected from rte.insertHTML as it uses a custom insertion. If you need to preserve the native editing undo stack you can use this API

GJSBlock

Thanks for reporting this, @DhanaDSP1120. The issue with Undo not working properly on InsertHTML in text block appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DO...

#4691Oct 26, 2022by DhanaDSP11202 answers
1 reactions

Undo manager - Not working properly, when we try to apply and undo the background color then made click outside the block, then the removed color will appears

Undo manager - Not working properly, when we try to apply and undo the background color then made click outside the block, then the removed color will appears It occurs on version 0.19.4 to till latest , its working fine on below versions Reproduce links Working version : https://jsfiddle.net/0vpbLmxy/ Not working ver...

artf

Seems to be an issue with the color picker itself, I'll try to fix it for the next release. ps: for bug reports you don't need to create the discussion first, you can open directly the issue by following the template. This will also avoid...

GJSBlock

Thanks for reporting this, @DhanaDSP1120. Thanks for sharing your report about Undo manager - Not working properly, when we try to apply and undo the background color then made click outside the block, then the removed color will appears....

Browse all topics