/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
};\r
\r
/**\r
- * Removes and editor instance from the global {@link CKEDITOR} object. his function\r
- * is available for internal use mainly.\r
- * @param {CKEDITOR.editor} editor The editor instance to be added.\r
+ * Removes an editor instance from the global {@link CKEDITOR} object. This function\r
+ * is available for internal use only. External code must use {@link CKEDITOR.editor.prototype.destroy}\r
+ * to avoid memory leaks.\r
+ * @param {CKEDITOR.editor} editor The editor instance to be removed.\r
* @example\r
*/\r
CKEDITOR.remove = function( editor )\r
CKEDITOR.TRISTATE_DISABLED = 0;\r
\r
/**\r
+ * The editor which is currently active (have user focus).\r
+ * @name CKEDITOR.currentInstance\r
+ * @type CKEDITOR.editor\r
+ * @see CKEDITOR#currentInstance\r
+ * @example\r
+ * function showCurrentEditorName()\r
+ * {\r
+ * if ( CKEDITOR.currentInstance )\r
+ * alert( CKEDITOR.currentInstance.name );\r
+ * else\r
+ * alert( 'Please focus an editor first.' );\r
+ * }\r
+ */\r
+\r
+/**\r
* Fired when the CKEDITOR.currentInstance object reference changes. This may\r
* happen when setting the focus on different editor instances in the page.\r
* @name CKEDITOR#currentInstance\r
* @event\r
+ * var editor; // Variable to hold a reference to the current editor.\r
+ * CKEDITOR.on( 'currentInstance' , function( e )\r
+ * {\r
+ * editor = CKEDITOR.currentInstance;\r
+ * });\r
+ */\r
+\r
+/**\r
+ * Fired when the last instance has been destroyed. This event is used to perform\r
+ * global memory clean up.\r
+ * @name CKEDITOR#reset\r
+ * @event\r
*/\r