/*\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
// Setup the submit function because it doesn't fire the\r
// "submit" event.\r
- if ( !form.$.submit.nodeName )\r
+ if ( !form.$.submit.nodeName && !form.$.submit.length )\r
{\r
form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit )\r
{\r
if ( !noUpdate )\r
this.updateElement();\r
\r
- if ( this.mode )\r
- {\r
- // -> currentMode.unload( holderElement );\r
- this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) );\r
- }\r
-\r
- this.theme.destroy( this );\r
-\r
- var toolbars,\r
- index = 0,\r
- j,\r
- items,\r
- instance;\r
-\r
- if ( this.toolbox )\r
- {\r
- toolbars = this.toolbox.toolbars;\r
- for ( ; index < toolbars.length ; index++ )\r
- {\r
- items = toolbars[ index ].items;\r
- for ( j = 0 ; j < items.length ; j++ )\r
- {\r
- instance = items[ j ];\r
- if ( instance.clickFn ) CKEDITOR.tools.removeFunction( instance.clickFn );\r
- if ( instance.keyDownFn ) CKEDITOR.tools.removeFunction( instance.keyDownFn );\r
-\r
- if ( instance.index ) CKEDITOR.ui.button._.instances[ instance.index ] = null;\r
- }\r
- }\r
- }\r
-\r
- if ( this.contextMenu )\r
- CKEDITOR.tools.removeFunction( this.contextMenu._.functionId );\r
-\r
- if ( this._.filebrowserFn )\r
- CKEDITOR.tools.removeFunction( this._.filebrowserFn );\r
+ this.theme && this.theme.destroy( this );\r
\r
this.fire( 'destroy' );\r
CKEDITOR.remove( this );\r
\r
/**\r
* Fired when all plugins are loaded and initialized into the editor instance.\r
- * @name CKEDITOR#pluginsLoaded\r
+ * @name CKEDITOR.editor#pluginsLoaded\r
* @event\r
- * @param {CKEDITOR.editor} editor The editor instance that has been destroyed.\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
*/\r
\r
/**\r
* if( editor.config.fullPage )\r
* alert( 'This is a full page editor' );\r
*/\r
+\r
+/**\r
+ * Fired when this editor instance is destroyed. The editor at this\r
+ * point isn't usable and this event should be used to perform clean up\r
+ * in any plugin.\r
+ * @name CKEDITOR.editor#destroy\r
+ * @event\r
+ */\r
+\r
+/**\r
+ * Internal event to get the current data.\r
+ * @name CKEDITOR.editor#beforeGetData\r
+ * @event\r
+ */\r
+\r
+/**\r
+ * Internal event to perform the #getSnapshot call.\r
+ * @name CKEDITOR.editor#getSnapshot\r
+ * @event\r
+ */\r
+\r
+/**\r
+ * Internal event to perform the #loadSnapshot call.\r
+ * @name CKEDITOR.editor#loadSnapshot\r
+ * @event\r
+ */\r
+\r
+\r
+/**\r
+ * Event fired before the #getData call returns allowing additional manipulation.\r
+ * @name CKEDITOR.editor#getData\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
+ * @param {String} data.dataValue The data that will be returned.\r
+ */\r
+\r
+/**\r
+ * Event fired before the #setData call is executed allowing additional manipulation.\r
+ * @name CKEDITOR.editor#setData\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
+ * @param {String} data.dataValue The data that will be used.\r
+ */\r
+\r
+/**\r
+ * Event fired at the end of the #setData call is executed. Usually it's better to use the\r
+ * {@link CKEDITOR.editor.prototype.dataReady} event.\r
+ * @name CKEDITOR.editor#afterSetData\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
+ * @param {String} data.dataValue The data that has been set.\r
+ */\r
+\r
+/**\r
+ * Internal event to perform the #insertHtml call\r
+ * @name CKEDITOR.editor#insertHtml\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
+ * @param {String} data The HTML to insert.\r
+ */\r
+\r
+/**\r
+ * Internal event to perform the #insertText call\r
+ * @name CKEDITOR.editor#insertText\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
+ * @param {String} text The text to insert.\r
+ */\r
+\r
+/**\r
+ * Internal event to perform the #insertElement call\r
+ * @name CKEDITOR.editor#insertElement\r
+ * @event\r
+ * @param {CKEDITOR.editor} editor This editor instance.\r
+ * @param {Object} element The element to insert.\r
+ */\r