TinyMCE:API/tinymce.Editor/onUndo
From Moxiecode Documentation Wiki
Contents |
[edit]
Event: onUndo
[edit]
Summary
This event gets executed when the users undoes some action in the editor.
[edit]
Syntax
event_callback(<tinymce.Editor> ed, <Object> l, <tinymce.UndoManager> um)
[edit]
Parameters
- ed
- Sender object/Editor instance that is serializing an element.
- l
- Undo level, that the editor contents was restored to.
- um
- Undo manager for the undo action.
[edit]
Examples
// Adds an observer to the onUndo event using tinyMCE.init
tinyMCE.init({
...
setup : function(ed) {
ed.onUndo.add(function(ed, l) {
console.debug('Undo was performed: ' + l.content);
});
}
});
// Adds an observer to the onUndo event using the render method
var ed = new tinymce.Editor('someid', {
.. Some settings
});
ed.onUndo.add(function(ed, l) {
console.debug('Undo was performed: ' + l.content);
});
ed.render();
