X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Feditingblock%2Fplugin.js;h=8676a11af66d903c0271895f2fcd6efc1ceb257b;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=8feabcd2a45c23ca5d94986fb88abb2d75637900;hpb=4e70ea24db840898be8cc21c950363a52a2a6aba;p=ckeditor.git diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index 8feabcd..8676a11 100644 --- a/_source/plugins/editingblock/plugin.js +++ b/_source/plugins/editingblock/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -163,6 +163,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( mode == this.mode ) return; + this._.previousMode = this.mode; + this.fire( 'beforeModeUnload' ); var currentMode = this.getMode(); @@ -187,7 +189,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license }); } - modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data); + modeEditor.load( holderElement, ( typeof data ) != 'string' ? this.getData() : data ); }; /** @@ -255,15 +257,22 @@ CKEDITOR.config.editingBlock = true; */ /** - * Fired before changing the editing mode. + * Fired before changing the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#mode * @name CKEDITOR.editor#beforeModeUnload * @event */ /** - * Fired before the editor mode is set. + * Fired before the editor mode is set. See also CKEDITOR.editor#mode and CKEDITOR.editor#beforeModeUnload * @name CKEDITOR.editor#beforeSetMode * @event * @since 3.5.3 * @param {String} newMode The name of the mode which is about to be set. */ + +/** + * Fired after setting the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#beforeModeUnload + * @name CKEDITOR.editor#mode + * @event + * @param {String} previousMode The previous mode of the editor. + */