X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Feditingblock%2Fplugin.js;h=05d78b6a35f0ca50d213e6f79d9f59db7b6cb605;hp=c3e48d2ca7b5e4c2a673809c6d8d2ddcaf050605;hb=4e90e78dc97789709ee7404359a5517540c27553;hpb=8f6c203fdaa543c3bca40baea6ae4ddcdf1a77f5 diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index c3e48d2..05d78b6 100644 --- a/_source/plugins/editingblock/plugin.js +++ b/_source/plugins/editingblock/plugin.js @@ -153,6 +153,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editor.prototype.setMode = function( mode ) { + this.fire( 'beforeSetMode', { newMode : mode } ); + var data, holderElement = this.getThemeSpace( 'contents' ), isDirty = this.checkDirty(); @@ -195,6 +197,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editor.prototype.focus = function() { + this.forceNextSelectionCheck(); var mode = getMode( this ); if ( mode ) mode.focus(); @@ -213,6 +216,7 @@ CKEDITOR.config.startupMode = 'wysiwyg'; /** * Sets whether the editor should have the focus when the page loads. + * @name CKEDITOR.config.startupFocus * @type Boolean * @default false * @example @@ -242,7 +246,15 @@ CKEDITOR.config.editingBlock = true; */ /** - * Fired before changing the editing mode + * Fired before changing the editing mode. * @name CKEDITOR.editor#beforeModeUnload * @event */ + + /** + * Fired before the editor mode is set. + * @name CKEDITOR.editor#beforeSetMode + * @event + * @since 3.5.3 + * @param {String} newMode The name of the mode which is about to be set. + */