You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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