Issue #1509💬 AnsweredOpened October 12, 2018by Deepak8131 reactions

How to disable undo button

Quick answerby artf1

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)

chrisrobbinsMay 8, 2019

@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...

artfMay 11, 2019

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.

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.