JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1.1
[ckeditor.git] / _source / core / editor.js
index c065301..5a80fe8 100644 (file)
@@ -575,19 +575,21 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
                },\r
 \r
                /**\r
-                * Sets the editor data. The data must be provided in raw format (HTML).\r
-                * <b>Note:</b> This's an asynchronous method, the {@param callback}\r
-                * function should be relied on if you want to interact with the editor\r
-                * after data is fully loaded.\r
-                *\r
-                * @param {String} data HTML code to replace the curent content in the editor.\r
-                * @param {Function} callback Function to be called after the setData is completed.\r
+                * Sets the editor data. The data must be provided in raw format (HTML).<br />\r
+                * <br />\r
+                * Note that this menthod is asynchronous. The "callback" parameter must\r
+                * be used if interaction with the editor is needed after setting the data.\r
+                * @param {String} data HTML code to replace the curent content in the\r
+                *              editor.\r
+                * @param {Function} callback Function to be called after the setData\r
+                *              is completed.\r
                 * @example\r
-                * CKEDITOR.instances.editor1.<b>setData( '&lt;p&gt;This is the editor data.&lt;/p&gt;' )</b>;\r
-                * CKEDITOR.instances.editor1.setData( '&lt;p&gt;Some other editor data.&lt;/p&gt;', function()\r
-                * {\r
-                *              CKEDITOR.instances.editor1.checkDirty();        // true\r
-                * } );\r
+                * CKEDITOR.instances.editor1.<b>setData</b>( '&lt;p&gt;This is the editor data.&lt;/p&gt;' );\r
+                * @example\r
+                * CKEDITOR.instances.editor1.<b>setData</b>( '&lt;p&gt;Some other editor data.&lt;/p&gt;', function()\r
+                *     {\r
+                *         this.checkDirty();    // true\r
+                *     });\r
                 */\r
                setData : function( data , callback )\r
                {\r
@@ -599,6 +601,7 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
                                        callback.call( evt.editor );\r
                                } );\r
                        }\r
+\r
                        // Fire "setData" so data manipulation may happen.\r
                        var eventData = { dataValue : data };\r
                        this.fire( 'setData', eventData );\r
@@ -658,7 +661,7 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
                        {\r
                                var data = this.getData();\r
 \r
-                               if( this.config.htmlEncodeOutput )\r
+                               if ( this.config.htmlEncodeOutput )\r
                                        data = CKEDITOR.tools.htmlEncode( data );\r
 \r
                                if ( element.is( 'textarea' ) )\r
@@ -685,8 +688,31 @@ CKEDITOR.on( 'loaded', function()
 /**\r
  * Whether escape HTML when editor update original input element.\r
  * @name CKEDITOR.config.htmlEncodeOutput\r
- * @type {Boolean}\r
+ * @since 3.1\r
+ * @type Boolean\r
  * @default false\r
  * @example\r
  * config.htmlEncodeOutput = true;\r
  */\r
+\r
+/**\r
+ * Fired when a CKEDITOR instance is created, but still before initializing it.\r
+ * To interact with a fully initialized instance, use the\r
+ * {@link CKEDITOR#instanceReady} event instead.\r
+ * @name CKEDITOR#instanceCreated\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor The editor instance that has been created.\r
+ */\r
+\r
+/**\r
+ * Fired when a CKEDITOR instance is destroyed.\r
+ * @name CKEDITOR#instanceDestroyed\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor The editor instance that has been destroyed.\r
+ */\r
+\r
+/**\r
+ * Fired when all plugins are loaded and initialized into the editor instance.\r
+ * @name CKEDITOR#pluginsLoaded\r
+ * @event\r
+ */\r