Issue #700💬 AnsweredOpened January 2, 2018by krunal0390 reactions

Undomanager and ctrl+z/ctrl+y

Quick answerby ryandeba

Hi @krunal039, You probably want to clear out the undo history right after populated your content from the db. editor.UndoManager.clear();

Read full answer below ↓

Question

we load content from db once editor page load and if use select undo after any changes it makes editor canvas blank. Is there way to solve it?

Answers (3)

ryandebaJanuary 2, 2018

Hi @krunal039,

You probably want to clear out the undo history right after populated your content from the db.

editor.UndoManager.clear();

krunal039January 2, 2018

@ryandeba I tried and now undo and redo button does not do anything(not even blank editor canvas) I have below code [{ id: "undo", className: "fa fa-undo icon-undo", command: function command(editor, sender) { sender.set("active", 0); editor.UndoManager.undo(1); }, attributes: { title: "Undo (CTRL/...

ryandebaJanuary 2, 2018

@krunal039 Could you create a jsfiddle example that shows the issue? Calling editor.UndoManager.clear() shouldn't completely break the undo/redo functionality, so I suspect there is some other issue going on.

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.