JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.3
[ckeditor.git] / _source / plugins / editingblock / plugin.js
index c3e48d2..05d78b6 100644 (file)
@@ -153,6 +153,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
         */\r
        CKEDITOR.editor.prototype.setMode = function( mode )\r
        {\r
+               this.fire( 'beforeSetMode', { newMode : mode } );\r
+\r
                var data,\r
                        holderElement = this.getThemeSpace( 'contents' ),\r
                        isDirty = this.checkDirty();\r
@@ -195,6 +197,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
         */\r
        CKEDITOR.editor.prototype.focus = function()\r
        {\r
+               this.forceNextSelectionCheck();\r
                var mode = getMode( this );\r
                if ( mode )\r
                        mode.focus();\r
@@ -213,6 +216,7 @@ CKEDITOR.config.startupMode = 'wysiwyg';
 \r
 /**\r
  * Sets whether the editor should have the focus when the page loads.\r
+ * @name CKEDITOR.config.startupFocus\r
  * @type Boolean\r
  * @default false\r
  * @example\r
@@ -242,7 +246,15 @@ CKEDITOR.config.editingBlock = true;
  */\r
 \r
 /**\r
- * Fired before changing the editing mode\r
+ * Fired before changing the editing mode.\r
  * @name CKEDITOR.editor#beforeModeUnload\r
  * @event\r
  */\r
+\r
+ /**\r
+ * Fired before the editor mode is set.\r
+ * @name CKEDITOR.editor#beforeSetMode\r
+ * @event\r
+ * @since 3.5.3\r
+ * @param {String} newMode The name of the mode which is about to be set.\r
+ */\r