How to disable undo button
On undo/redo events https://grapesjs.com/docs/api/editor.html#general you can use Undo Manager APIs https://grapesjs.com/docs/api/undo_manager.html
Read full answer below ↓Question
Hi @artf,
Hope you are doing well with grapesjs.
Can you please let us know how to disable the undo button when no data present in undo manager and vice-versa.I have check all new events but unable to find the undo active/disactive event.can you help us.
Thanks in advance
Answers (3)
On undo/redo events https://grapesjs.com/docs/api/editor.html#general
you can use Undo Manager APIs https://grapesjs.com/docs/api/undo_manager.html
@artf If the undo event needs to be triggered to present it's data, then how can we render or disable the undo/redo btns? Out of the box the Undo/Redo buttons will clear out an entire template if the undo/redo event hasn't tracked anything. I am trying to conditionally render the undo/redo buttons...
If the undo event needs to be triggered to present it's data, then how can we render or disable the undo/redo btns? ??? You can use the Undo Manager APIs wherever you want, I didn't say you can use it only after undo/redo events.The Update event never seems to be triggered The update event was adde...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1111
How to add parent class when drag element
Hi @artf, Hope you are doing fine. Please let us know how we can add the parent class of div when new element is dragged inside that div li...
Issue #1683
How to change id/class when new element drop on editor or render element with dynamic ip?
Hello @artf , Hope you are doing well. I have two questions regards dynamic blocks adding, 1) Is it possible to render the block with dynam...
Issue #1527
How to add countdown/navigation event in undo/redo
Hello @artf, How can we add any changes/events in undo/redo Manager like when we drag element like navigation or countdown. Hope for positi...
Issue #1497
Inner element content change with pop-up
Hello @artf I've make pop-up for select custom link data with image. Now all the data reflected properly but when I try to change src than...
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.