Reset Undo on the tinymce editor

The global variable tinyMCE has an array of editors. So you have to call the undoManager inside them. Like this for default wp editor on post edit/create screen:

tinyMCE.editors[0].undoManager.clear();

If you want to do it in a specific editor, select the editor id in n like this:

var n = 0; // editor id
tinyMCE.editors[n].undoManager.clear();

Leave a Comment

tech