X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fundo%2Fplugin.js;h=94744eadcf4c8bf36bf7fe76a4da102dafbaf727;hb=4e90e78dc97789709ee7404359a5517540c27553;hp=95bd04a1ddb14f859bff18e52f81667c32f6575c;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/undo/plugin.js b/_source/plugins/undo/plugin.js index 95bd04a..94744ea 100644 --- a/_source/plugins/undo/plugin.js +++ b/_source/plugins/undo/plugin.js @@ -148,6 +148,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var Image = CKEDITOR.plugins.undo.Image = function( editor ) { this.editor = editor; + + editor.fire( 'beforeUndoImage' ); + var contents = editor.getSnapshot(), selection = contents && editor.getSelection(); @@ -156,6 +159,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license this.contents = contents; this.bookmarks = selection && selection.createBookmarks2( true ); + + editor.fire( 'afterUndoImage' ); }; // Attributes that browser may changing them when setting via innerHTML. @@ -552,3 +557,23 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * @name CKEDITOR.editor#saveSnapshot * @event */ + +/** + * Fired before an undo image is to be taken. An undo image represents the + * editor state at some point. It's saved into an undo store, so the editor is + * able to recover the editor state on undo and redo operations. + * @name CKEDITOR.editor#beforeUndoImage + * @since 3.5.3 + * @see CKEDITOR.editor#afterUndoImage + * @event + */ + +/** + * Fired after an undo image is taken. An undo image represents the + * editor state at some point. It's saved into an undo store, so the editor is + * able to recover the editor state on undo and redo operations. + * @name CKEDITOR.editor#afterUndoImage + * @since 3.5.3 + * @see CKEDITOR.editor#beforeUndoImage + * @event + */