Event listener for undo?
Question
I am listening for a component delete and move with removed() and sorter:drag:end.
One last way (I hope) that I see the component move is by undo-ing a move. I need to listen to that event. Is there an event listener for undo?
Answers (3)
We actually support undo/redo events
I think, currently, the only possible way to track those changes is by using component:update:components event which will pass the added/removed component
@kickbk to my knowledge there is no such event, but i guess you can catch it by listening to component:add event.
cheers!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2723
Event listening for loaded asset
I need to find a way to expose the event listener when an image has been selected in the Asset Manager, is there a way to do it? I can only...
Issue #1541
Remove Last changes From Undo Manager Stack
@artf Hello Can we remove the last event (changes) from undomanger. I need remove last event (change) from undo manger stack. I can get und...
Issue #2404
How to observe children changes in component
Is there an easy way to subscribe/listen to changes in the components/children of my custom component type? Perhaps an event I can subscrib...
Issue #2433
Changing layerable in an an event at runtime doesn't immediately update
When I change the layerable option of a custom component in an event, it still shows up in the layers until you drag it once. Is there some...
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.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.