/*\r
-Copyright (c) 2003-2009, 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
* (Virtual Class) Do not call this constructor. This class is not really part\r
- * of the API. It just illustrates the features of command objects to be\r
- * passed to the {@link CKEDITOR.editor.prototype.addCommand} function.\r
+ * of the API.\r
* @name CKEDITOR.commandDefinition\r
- * @constructor\r
+ * @class Virtual class that illustrates the features of command objects to be\r
+ * passed to the {@link CKEDITOR.editor.prototype.addCommand} function.\r
* @example\r
*/\r
\r
/**\r
- * Executes the command.\r
+ * The function to be fired when the commend is executed.\r
* @name CKEDITOR.commandDefinition.prototype.exec\r
* @function\r
* @param {CKEDITOR.editor} editor The editor within which run the command.\r
\r
/**\r
* Whether the command need to be hooked into the redo/undo system.\r
- * @name CKEDITOR.commandDefinition.canUndo\r
- * @type {Boolean} If not defined or 'true' both hook into undo system, set it\r
- * to 'false' explicitly keep it out.\r
+ * @name CKEDITOR.commandDefinition.prototype.canUndo\r
+ * @type {Boolean}\r
+ * @default true\r
* @field\r
* @example\r
* editorInstance.addCommand( 'alertName',\r
*/\r
\r
/**\r
- * Whether the command is asynchronous, which means the 'afterCommandExec' event\r
- * will be fired by the command itself manually, and the 'exec' function return value\r
- * of this command is not to be returned.\r
- * @name CKEDITOR.commandDefinition.async\r
- * @type {Boolean} If defined as 'true', the command is asynchronous.\r
+ * Whether the command is asynchronous, which means that the\r
+ * {@link CKEDITOR.editor#event:afterCommandExec} event will be fired by the\r
+ * command itself manually, and that the return value of this command is not to\r
+ * be returned by the {@link CKEDITOR.command#exec} function.\r
+ * @name CKEDITOR.commandDefinition.prototype.async\r
+ * @default false\r
+ * @type {Boolean}\r
* @example\r
- * editorInstance.addCommand( 'alertName',\r
+ * editorInstance.addCommand( 'loadOptions',\r
* {\r
* exec : function( editor )\r
* {\r
* // Asynchronous operation below.\r
- * CKEDITOR.ajax.loadXml( 'data.xml' );\r
+ * CKEDITOR.ajax.loadXml( 'data.xml', function()\r
+ * {\r
+ * editor.fire( 'afterCommandExec' );\r
+ * ));\r
* },\r
* async : true // The command need some time to complete after exec function returns.\r
* });\r
*/\r
+\r
+/**\r
+ * Whether the command should give focus to the editor before execution.\r
+ * @name CKEDITOR.commandDefinition.prototype.editorFocus\r
+ * @type {Boolean}\r
+ * @default true\r
+ * @see CKEDITOR.command#editorFocus\r
+ * @example\r
+ * editorInstance.addCommand( 'maximize',\r
+ * {\r
+ * exec : function( editor )\r
+ * {\r
+ * // ...\r
+ * },\r
+ * editorFocus : false // The command doesn't require focusing the editing document.\r
+ * });\r
+ */\r
+\r
+\r
+/**\r
+ * Whether the command state should be set to {@link CKEDITOR.TRISTATE_DISABLED} on startup.\r
+ * @name CKEDITOR.commandDefinition.prototype.startDisabled\r
+ * @type {Boolean}\r
+ * @default false\r
+ * @example\r
+ * editorInstance.addCommand( 'unlink',\r
+ * {\r
+ * exec : function( editor )\r
+ * {\r
+ * // ...\r
+ * },\r
+ * startDisabled : true // Command is unavailable until selection is inside a link.\r
+ * });\r
+ */\r
+\r
+/**\r
+ * The editor modes within which the command can be executed. The execution\r
+ * will have no action if the current mode is not listed in this property.\r
+ * @name CKEDITOR.commandDefinition.prototype.modes\r
+ * @type Object\r
+ * @default { wysiwyg : 1 }\r
+ * @see CKEDITOR.command#modes\r
+ * @example\r
+ * editorInstance.addCommand( 'link',\r
+ * {\r
+ * exec : function( editor )\r
+ * {\r
+ * // ...\r
+ * },\r
+ * modes : { wysiwyg : 1 } // Command is available in wysiwyg mode only.\r
+ * });\r
+ */\r