Replies: 1 comment 1 reply
-
Hi @abhi1722, thanks for the report. To clarify, are you saying that all of your separate edits are being grouped into a single undo action, or is the edit history being erased, allowing you to only undo the very last change you made? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using GrapesJS with the following undo/redo methods:
editor.UndoManager.undo();
editor.UndoManager.redo();
The problem occurs specifically with text edits.
When I edit text inside a component and click undo, it only undoes the change once.
After that, redo doesn’t work or even show up.
For other components (shapes, images, etc.), undo/redo works correctly.
I tried adding this listener:
editorInstance.on('component:update:content', (component: any) => {
editorInstance.UndoManager.add(component);
});
But it still doesn’t fix the issue when text is selected and edited directly.
My question is:
Does GrapesJS handle text editing differently, which prevents redo from working?
Or do I need to explicitly handle text edits to make undo/redo work properly?
Beta Was this translation helpful? Give feedback.
All reactions