JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.6.1
[ckeditor.git] / _source / plugins / editingblock / plugin.js
index 8feabcd..8676a11 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -163,6 +163,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        if ( mode == this.mode )\r
                                return;\r
 \r
+                       this._.previousMode = this.mode;\r
+\r
                        this.fire( 'beforeModeUnload' );\r
 \r
                        var currentMode = this.getMode();\r
@@ -187,7 +189,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                });\r
                }\r
 \r
-               modeEditor.load( holderElement, ( typeof data ) != 'string'  ? this.getData() : data);\r
+               modeEditor.load( holderElement, ( typeof data ) != 'string'  ? this.getData() : data );\r
        };\r
 \r
        /**\r
@@ -255,15 +257,22 @@ CKEDITOR.config.editingBlock = true;
  */\r
 \r
 /**\r
- * Fired before changing the editing mode.\r
+ * Fired before changing the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#mode\r
  * @name CKEDITOR.editor#beforeModeUnload\r
  * @event\r
  */\r
 \r
  /**\r
- * Fired before the editor mode is set.\r
+ * Fired before the editor mode is set. See also CKEDITOR.editor#mode and CKEDITOR.editor#beforeModeUnload\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
+\r
+/**\r
+ * Fired after setting the editing mode. See also CKEDITOR.editor#beforeSetMode and CKEDITOR.editor#beforeModeUnload\r
+ * @name CKEDITOR.editor#mode\r
+ * @event\r
+ * @param {String} previousMode The previous mode of the editor.\r
+ */\r