How to programmatically execute undo and redo in CKEDITOR, and reset their stacks?

2k views Asked by At

Is there a way to programmatically execute undo and redo in CKEDITOR?

And the other question is: is there a way to reset the undo stack and also the redo stack?

1

There are 1 answers

3
Reinmar On BEST ANSWER

Undo:

editor.execCommand( 'undo' );

Redo:

editor.execCommand( 'redo' );

Reset:

editor.resetUndo();