Get information on action that was undone
Check model.attributes.type to understand the action executed, probably the after is null because the action was remove
Read full answer below ↓Question
Is it possible to extract information on what was undone. I tried
const um=editor.UndoManager;
um.getStack();
but I'm unable to fetch information on exactly what was undone, the value of after property under model.attributes is null. I wish to extract the id of the element that action was performed on and what update in style/removal/property/edit was made.
Answers (2)
Check model.attributes.type to understand the action executed, probably the after is null because the action was remove
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #701
Modifying a component in the editor clears the model content
What I'm trying to achieve: I have special "data-" attributes on some of the components I pull into the editor. When one of these is modifi...
Issue #1315
Get all the style value by ID
@artf I want to get all the style associated with model selected by ID after save the template and reload and re init the editor. But I can...
Issue #1971
event triggers previous state attributes to remote storage
I'm trying to extract the change in src of an image and store it in the remote storage using Storage Manager, by using the following code T...
Issue #529
editor.setComponents(html) reset to default traits values on editor
#522 thanks for all help was able to resolve via this.model.attributes. but now I have another issue, where editor.setComponents reset valu...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.