Issue #1968💬 AnsweredOpened April 19, 2019by sakshigarg90 reactions

Get information on action that was undone

快速解答by artf

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)

artfApril 23, 2019

Check model.attributes.type to understand the action executed, probably the after is null because the action was remove

lock[bot]April 25, 2020

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.