How do I set the afterRedo and afterUndo events? "editor.on( 'afterRedo', myFunction);" doesn't work and I tried lots of different things without success. Do I perhaps need to work with the undoManager? If so, how?
Wed, 04/21/2010 - 21:06
#1

Re: how to set the afterRedo/afterUndo events
editor.on( 'afterCommandExec', myFunction); function myFunction(event) { if ( event.name == 'afterCommandExec' && event.data.name != 'undo' && event.data.name != 'redo') return; // function code here ... }but still I would like to know how to set the afterRedo/afterUndo events though
Re: how to set the afterRedo/afterUndo events
var undoCmd = editor.getCommand( 'undo'); if (undoCmd) { undoCmd.on('afterUndo', function(){ alert("AfterUndo"); }); }