X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Feditor.js;h=20e5d7c0e07eae9e810667455ca66cac8617f2b8;hb=2f22c0c38f17e75be5541089076885442aaa2377;hp=d66aac9a223c887ebda764673b383fdda3084adf;hpb=8f6c203fdaa543c3bca40baea6ae4ddcdf1a77f5;p=ckeditor.git diff --git a/_source/core/editor.js b/_source/core/editor.js index d66aac9..20e5d7c 100644 --- a/_source/core/editor.js +++ b/_source/core/editor.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -120,11 +120,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * The name of the skin used by this editor instance. The skin name can - * be set though the {@link CKEDITOR.config.skin} setting. + * be set through the {@link CKEDITOR.config.skin} setting. * @name CKEDITOR.editor.prototype.skinName * @type String * @example - * alert( editor.skinName ); // "kama" (e.g.) + * alert( editor.skinName ); // E.g. "kama" */ editor.skinName = skinName; @@ -133,7 +133,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * @name CKEDITOR.editor.prototype.skinPath * @type String * @example - * alert( editor.skinPath ); // "http://example.com/ckeditor/skins/kama/" (e.g.) + * alert( editor.skinPath ); // E.g. "http://example.com/ckeditor/skins/kama/" */ editor.skinPath = skinPath; @@ -142,24 +142,33 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * @name CKEDITOR.editor.prototype.skinClass * @type String * @example - * alert( editor.skinClass ); // "cke_skin_kama" (e.g.) + * alert( editor.skinClass ); // E.g. "cke_skin_kama" */ editor.skinClass = 'cke_skin_' + skinName; /** * The tabbing * navigation order that has been calculated for this editor - * instance. This can be set by the {@link CKEDITOR.config.tabIndex} - * setting or taken from the "tabindex" attribute of the - * {@link #element} associated to the editor. + * instance. This can be set by the {@link CKEDITOR.config.tabIndex} + * setting or taken from the tabindex attribute of the + * {@link #element} associated with the editor. * @name CKEDITOR.editor.prototype.tabIndex * @type Number * @default 0 (zero) * @example - * alert( editor.tabIndex ); // "0" (e.g.) + * alert( editor.tabIndex ); // E.g. "0" */ editor.tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; + /** + * Indicates the read-only state of this editor. This is a read-only property. + * @name CKEDITOR.editor.prototype.readOnly + * @type Boolean + * @since 3.6 + * @see CKEDITOR.editor#setReadOnly + */ + editor.readOnly = !!( editor.config.readOnly || editor.element.getAttribute( 'disabled' ) ); + // Fire the "configLoaded" event. editor.fireOnce( 'configLoaded' ); @@ -173,21 +182,21 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { /** * The code for the language resources that have been loaded - * for the user internface elements of this editor instance. + * for the user interface elements of this editor instance. * @name CKEDITOR.editor.prototype.langCode * @type String * @example - * alert( editor.langCode ); // "en" (e.g.) + * alert( editor.langCode ); // E.g. "en" */ editor.langCode = languageCode; /** - * An object holding all language strings used by the editor + * An object that contains all language strings used by the editor * interface. * @name CKEDITOR.editor.prototype.lang * @type CKEDITOR.lang * @example - * alert( editor.lang.bold ); // "Negrito" (e.g. if language is Portuguese) + * alert( editor.lang.bold ); // E.g. "Negrito" (if the language is set to Portuguese) */ // As we'll be adding plugin specific entries that could come // from different language code files, we need a copy of lang, @@ -198,6 +207,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' ) editor.lang.dir = 'ltr'; + editor.fire( 'langLoaded' ); + var config = editor.config; config.contentsLangDirection == 'ui' && ( config.contentsLangDirection = editor.lang.dir ); @@ -244,12 +255,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var languageFiles = []; /** - * And object holding references to all plugins used by this - * editor istance. + * An object that contains references to all plugins used by this + * editor instance. * @name CKEDITOR.editor.prototype.plugins * @type Object * @example - * alert( editor.plugins.dialog.path ); // "http://example.com/ckeditor/plugins/dialog/" (e.g.) + * alert( editor.plugins.dialog.path ); // E.g. "http://example.com/ckeditor/plugins/dialog/" */ editor.plugins = plugins; @@ -272,7 +283,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // is not available, get the first one (default one). lang = ( CKEDITOR.tools.indexOf( pluginLangs, editor.langCode ) >= 0 ? editor.langCode : pluginLangs[ 0 ] ); - if ( !plugin.lang[ lang ] ) + if ( !plugin.langEntries || !plugin.langEntries[ lang ] ) { // Put the language file URL into the list of files to // get downloaded. @@ -280,7 +291,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } else { - CKEDITOR.tools.extend( editor.lang, plugin.lang[ lang ] ); + CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ lang ] ); lang = null; } } @@ -305,7 +316,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Uses the first loop to update the language entries also. if ( m === 0 && languageCodes[ i ] && plugin.lang ) - CKEDITOR.tools.extend( editor.lang, plugin.lang[ languageCodes[ i ] ] ); + CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ languageCodes[ i ] ] ); // Call the plugin method (beforeInit and init). if ( plugin[ methods[ m ] ] ) @@ -338,7 +349,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license * @name CKEDITOR.editor.prototype.theme * @type CKEDITOR.theme * @example - * alert( editor.theme ); "http://example.com/ckeditor/themes/default/" (e.g.) + * alert( editor.theme ); // E.g. "http://example.com/ckeditor/themes/default/" */ var editorTheme = editor.theme = CKEDITOR.themes.get( theme ); editorTheme.path = CKEDITOR.themes.getPath( theme ); @@ -394,22 +405,26 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } }; - function updateCommandsMode() + function updateCommands() { var command, commands = this._.commands, mode = this.mode; + if ( !mode ) + return; + for ( var name in commands ) { command = commands[ name ]; - command[ command.startDisabled ? 'disable' : command.modes[ mode ] ? 'enable' : 'disable' ](); + command[ command.startDisabled ? 'disable' : + this.readOnly && !command.readOnly ? 'disable' : command.modes[ mode ] ? 'enable' : 'disable' ](); } } /** * Initializes the editor instance. This function is called by the editor - * contructor (editor_basic.js). + * contructor (editor_basic.js). * @private */ CKEDITOR.editor.prototype._init = function() @@ -425,24 +440,25 @@ For licensing, see LICENSE.html or http://ckeditor.com/license this._.styles = []; /** - * The DOM element that has been replaced by this editor instance. This - * element holds the editor data on load and post. + * The DOM element that was replaced by this editor instance. This + * element stores the editor data on load and post. * @name CKEDITOR.editor.prototype.element * @type CKEDITOR.dom.element * @example * var editor = CKEDITOR.instances.editor1; - * alert( editor.element.getName() ); "textarea" + * alert( editor.element.getName() ); // E.g. "textarea" */ this.element = element; /** - * The editor instance name. It hay be the replaced element id, name or - * a default name using a progressive counter (editor1, editor2, ...). + * The editor instance name. It may be the replaced element ID, name, or + * a default name using the progressive counter (editor1, + * editor2, ...). * @name CKEDITOR.editor.prototype.name * @type String * @example * var editor = CKEDITOR.instances.editor1; - * alert( editor.name ); "editor1" + * alert( editor.name ); // "editor1" */ this.name = ( element && ( this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) && ( element.getId() || element.getNameAtt() ) ) @@ -452,7 +468,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license throw '[CKEDITOR.editor] The instance "' + this.name + '" already exists.'; /** - * A unique random string assigned to each editor instance in the page. + * A unique random string assigned to each editor instance on the page. * @name CKEDITOR.editor.prototype.id * @type String */ @@ -460,19 +476,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * The configurations for this editor instance. It inherits all - * settings defined in (@link CKEDITOR.config}, combined with settings + * settings defined in (@link CKEDITOR.config}, combined with settings * loaded from custom configuration files and those defined inline in * the page when creating the editor. * @name CKEDITOR.editor.prototype.config * @type Object * @example * var editor = CKEDITOR.instances.editor1; - * alert( editor.config.theme ); "default" e.g. + * alert( editor.config.theme ); // E.g. "default" */ this.config = CKEDITOR.tools.prototypedCopy( CKEDITOR.config ); /** - * Namespace containing UI features related to this editor instance. + * The namespace containing UI features related to this editor instance. * @name CKEDITOR.editor.prototype.ui * @type CKEDITOR.ui * @example @@ -482,7 +498,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Controls the focus state of this editor instance. This property * is rarely used for normal API operations. It is mainly - * destinated to developer adding UI elements to the editor interface. + * intended for developers adding UI elements to the editor interface. * @name CKEDITOR.editor.prototype.focusManager * @type CKEDITOR.focusManager * @example @@ -491,7 +507,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.fire( 'instanceCreated', null, this ); - this.on( 'mode', updateCommandsMode, null, null, 1 ); + this.on( 'mode', updateCommands, null, null, 1 ); + this.on( 'readOnly', updateCommands, null, null, 1 ); initConfig( this, instanceConfig ); }; @@ -502,7 +519,7 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, { /** * Adds a command definition to the editor instance. Commands added with - * this function can be later executed with {@link #execCommand}. + * this function can be executed later with the {@link #execCommand} method. * @param {String} commandName The indentifier name of the command. * @param {CKEDITOR.commandDefinition} commandDefinition The command definition. * @example @@ -520,8 +537,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Add a trunk of css text to the editor which will be applied to the wysiwyg editing document. - * Note: This function should be called before editor is loaded to take effect. + * Adds a piece of CSS code to the editor which will be applied to the WYSIWYG editing document. + * This CSS would not be added to the output, and is there mainly for editor-specific editing requirements. + * Note: This function should be called before the editor is loaded to take effect. * @param css {String} CSS text. * @example * editorInstance.addCss( 'body { background-color: grey; }' ); @@ -538,9 +556,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, * element, this parameter indicates whether or not to update the * element with the instance contents. * @example - * alert( CKEDITOR.instances.editor1 ); e.g "object" - * CKEDITOR.instances.editor1.destroy(); - * alert( CKEDITOR.instances.editor1 ); "undefined" + * alert( CKEDITOR.instances.editor1 ); // E.g "object" + * CKEDITOR.instances.editor1.destroy(); + * alert( CKEDITOR.instances.editor1 ); // "undefined" */ destroy : function( noUpdate ) { @@ -555,13 +573,14 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Executes a command. + * Executes a command associated with the editor. * @param {String} commandName The indentifier name of the command. - * @param {Object} [data] Data to be passed to the command - * @returns {Boolean} "true" if the command has been successfuly - * executed, otherwise "false". + * @param {Object} [data] Data to be passed to the command. + * @returns {Boolean} true if the command was executed + * successfully, otherwise false. + * @see CKEDITOR.editor.addCommand * @example - * editorInstance.execCommand( 'Bold' ); + * editorInstance.execCommand( 'bold' ); */ execCommand : function( commandName, data ) { @@ -591,12 +610,14 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Gets one of the registered commands. Note that, after registering a - * command definition with addCommand, it is transformed internally - * into an instance of {@link CKEDITOR.command}, which will be then - * returned by this function. + * Gets one of the registered commands. Note that after registering a + * command definition with {@link #addCommand}, it is + * transformed internally into an instance of + * {@link CKEDITOR.command}, which will then be returned + * by this function. * @param {String} commandName The name of the command to be returned. - * This is the same used to register the command with addCommand. + * This is the same name that is used to register the command with + * addCommand. * @returns {CKEDITOR.command} The command object identified by the * provided name. */ @@ -611,7 +632,7 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, * @type String * @returns (String) The editor data. * @example - * if ( CKEDITOR.instances.editor1.getData() == '' ) + * if ( CKEDITOR.instances.editor1.getData() == '' ) * alert( 'There is no data available' ); */ getData : function() @@ -639,11 +660,13 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, /** * Gets the "raw data" currently available in the editor. This is a - * fast method which return the data as is, without processing, so it's - * not recommended to use it on resulting pages. It can be used instead - * combined with the {@link #loadSnapshot} so one can automatic save - * the editor data from time to time while the user is using the - * editor, to avoid data loss, without risking performance issues. + * fast method which returns the data as is, without processing, so it is + * not recommended to use it on resulting pages. Instead it can be used + * combined with the {@link #loadSnapshot} method in order + * to be able to automatically save the editor data from time to time + * while the user is using the editor, to avoid data loss, without risking + * performance issues. + * @see CKEDITOR.editor.getData * @example * alert( editor.getSnapshot() ); */ @@ -662,13 +685,14 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Loads "raw data" in the editor. This data is loaded with processing + * Loads "raw data" into the editor. The data is loaded with processing * straight to the editing area. It should not be used as a way to load * any kind of data, but instead in combination with - * {@link #getSnapshot} produced data. + * {@link #getSnapshot} produced data. + * @see CKEDITOR.editor.setData * @example * var data = editor.getSnapshot(); - * editor.loadSnapshot( data ); + * editor.loadSnapshot( data ); */ loadSnapshot : function( snapshot ) { @@ -676,21 +700,22 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Sets the editor data. The data must be provided in raw format (HTML).
+ * Sets the editor data. The data must be provided in the raw format (HTML).
*
- * Note that this menthod is asynchronous. The "callback" parameter must + * Note that this method is asynchronous. The callback parameter must * be used if interaction with the editor is needed after setting the data. * @param {String} data HTML code to replace the curent content in the * editor. - * @param {Function} callback Function to be called after the setData + * @param {Function} callback Function to be called after the setData * is completed. - *@param {Boolean} internal Whether suppress any event firing when copying data internally inside editor. + *@param {Boolean} internal Whether to suppress any event firing when copying data + * internally inside the editor. * @example - * CKEDITOR.instances.editor1.setData( '<p>This is the editor data.</p>' ); + * CKEDITOR.instances.editor1.setData( '<p>This is the editor data.</p>' ); * @example - * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() + * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() * { - * this.checkDirty(); // true + * this.checkDirty(); // true * }); */ setData : function( data , callback, internal ) @@ -714,10 +739,35 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Inserts HTML into the currently selected position in the editor. + * Puts or restores the editor into read-only state. When in read-only, + * the user is not able to change the editor contents, but can still use + * some editor features. This function sets the {@link CKEDITOR.config.readOnly} + * property of the editor, firing the {@link CKEDITOR.editor#readOnly} event.

+ * Note: the current editing area will be reloaded. + * @param {Boolean} [isReadOnly] Indicates that the editor must go + * read-only (true, default) or be restored and made editable + * (false). + * @since 3.6 + */ + setReadOnly : function( isReadOnly ) + { + isReadOnly = ( isReadOnly == undefined ) || isReadOnly; + + if ( this.readOnly != isReadOnly ) + { + this.readOnly = isReadOnly; + + // Fire the readOnly event so the editor features can update + // their state accordingly. + this.fire( 'readOnly' ); + } + }, + + /** + * Inserts HTML code into the currently selected position in the editor in WYSIWYG mode. * @param {String} data HTML code to be inserted into the editor. * @example - * CKEDITOR.instances.editor1.insertHtml( '<p>This is a new paragraph.</p>' ); + * CKEDITOR.instances.editor1.insertHtml( '<p>This is a new paragraph.</p>' ); */ insertHtml : function( data ) { @@ -726,14 +776,14 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, /** * Insert text content into the currently selected position in the - * editor, in WYSIWYG mode, styles of the selected element will be applied to the inserted text, - * spaces around the text will be leaving untouched. - * Note: two subsequent line-breaks will introduce one paragraph, which element depends on {@link CKEDITOR.config.enterMode}; + * editor in WYSIWYG mode. The styles of the selected element will be applied to the inserted text. + * Spaces around the text will be leaving untouched. + * Note: two subsequent line-breaks will introduce one paragraph. This depends on {@link CKEDITOR.config.enterMode}; * A single line-break will be instead translated into one <br />. * @since 3.5 * @param {String} text Text to be inserted into the editor. * @example - * CKEDITOR.instances.editor1.insertText( ' line1 \n\n line2' ); + * CKEDITOR.instances.editor1.insertText( ' line1 \n\n line2' ); */ insertText : function( text ) { @@ -742,12 +792,12 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, /** * Inserts an element into the currently selected position in the - * editor. + * editor in WYSIWYG mode. * @param {CKEDITOR.dom.element} element The element to be inserted * into the editor. * @example * var element = CKEDITOR.dom.element.createFromHtml( '<img src="hello.png" border="0" title="Hello" />' ); - * CKEDITOR.instances.editor1.insertElement( element ); + * CKEDITOR.instances.editor1.insertElement( element ); */ insertElement : function( element ) { @@ -755,16 +805,16 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Checks whether the current editor contents present changes when + * Checks whether the current editor contents contain changes when * compared to the contents loaded into the editor at startup, or to - * the contents available in the editor when {@link #resetDirty} has - * been called. - * @returns {Boolean} "true" is the contents present changes. + * the contents available in the editor when {@link #resetDirty} + * was called. + * @returns {Boolean} "true" is the contents contain changes. * @example * function beforeUnload( e ) * { - * if ( CKEDITOR.instances.editor1.checkDirty() ) - * return e.returnValue = "You'll loose the changes made in the editor."; + * if ( CKEDITOR.instances.editor1.checkDirty() ) + * return e.returnValue = "You will lose the changes made in the editor."; * } * * if ( window.addEventListener ) @@ -779,11 +829,11 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, /** * Resets the "dirty state" of the editor so subsequent calls to - * {@link #checkDirty} will return "false" if the user will not make - * further changes to the contents. + * {@link #checkDirty} will return false if the user will not + * have made further changes to the contents. * @example - * alert( editor.checkDirty() ); // "true" (e.g.) - * editor.resetDirty(); + * alert( editor.checkDirty() ); // E.g. "true" + * editor.resetDirty(); * alert( editor.checkDirty() ); // "false" */ resetDirty : function() @@ -793,8 +843,9 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Updates the <textarea> element that has been replaced by the editor with + * Updates the <textarea> element that was replaced by the editor with * the current data available in the editor. + * @see CKEDITOR.editor.element * @example * CKEDITOR.instances.editor1.updateElement(); * alert( document.getElementById( 'editor1' ).value ); // The current editor data. @@ -831,7 +882,7 @@ CKEDITOR.on( 'loaded', function() }); /** - * Whether escape HTML when editor update original input element. + * Whether to escape HTML when the editor updates the original input element. * @name CKEDITOR.config.htmlEncodeOutput * @since 3.1 * @type Boolean @@ -841,9 +892,21 @@ CKEDITOR.on( 'loaded', function() */ /** + * If true, makes the editor start in read-only state. Otherwise, it will check + * if the linked <textarea> element has the disabled attribute. + * @name CKEDITOR.config.readOnly + * @see CKEDITOR.editor#setReadOnly + * @type Boolean + * @default false + * @since 3.6 + * @example + * config.readOnly = true; + */ + +/** * Fired when a CKEDITOR instance is created, but still before initializing it. * To interact with a fully initialized instance, use the - * {@link CKEDITOR#instanceReady} event instead. + * {@link CKEDITOR#instanceReady} event instead. * @name CKEDITOR#instanceCreated * @event * @param {CKEDITOR.editor} editor The editor instance that has been created. @@ -857,6 +920,14 @@ CKEDITOR.on( 'loaded', function() */ /** + * Fired when the language is loaded into the editor instance. + * @name CKEDITOR.editor#langLoaded + * @event + * @since 3.6.1 + * @param {CKEDITOR.editor} editor This editor instance. + */ + +/** * Fired when all plugins are loaded and initialized into the editor instance. * @name CKEDITOR.editor#pluginsLoaded * @event @@ -864,7 +935,7 @@ CKEDITOR.on( 'loaded', function() */ /** - * Fired before the command execution when {@link #execCommand} is called. + * Fired before the command execution when {@link #execCommand} is called. * @name CKEDITOR.editor#beforeCommandExec * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -875,7 +946,7 @@ CKEDITOR.on( 'loaded', function() */ /** - * Fired after the command execution when {@link #execCommand} is called. + * Fired after the command execution when {@link #execCommand} is called. * @name CKEDITOR.editor#afterCommandExec * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -886,16 +957,15 @@ CKEDITOR.on( 'loaded', function() */ /** - * Fired every custom configuration file is loaded, before the final + * Fired when the custom configuration file is loaded, before the final * configurations initialization.
*
* Custom configuration files can be loaded thorugh the - * {@link CKEDITOR.config.customConfig} setting. Several files can be loading - * by chaning this setting. + * {@link CKEDITOR.config.customConfig} setting. Several files can be loaded + * by changing this setting. * @name CKEDITOR.editor#customConfigLoaded * @event * @param {CKEDITOR.editor} editor This editor instance. - * @example */ /** @@ -903,14 +973,11 @@ CKEDITOR.on( 'loaded', function() * @name CKEDITOR.editor#configLoaded * @event * @param {CKEDITOR.editor} editor This editor instance. - * @example - * if( editor.config.fullPage ) - * alert( 'This is a full page editor' ); */ /** * Fired when this editor instance is destroyed. The editor at this - * point isn't usable and this event should be used to perform clean up + * point is not usable and this event should be used to perform the clean-up * in any plugin. * @name CKEDITOR.editor#destroy * @event @@ -923,20 +990,19 @@ CKEDITOR.on( 'loaded', function() */ /** - * Internal event to perform the #getSnapshot call. + * Internal event to perform the #getSnapshot call. * @name CKEDITOR.editor#getSnapshot * @event */ /** - * Internal event to perform the #loadSnapshot call. + * Internal event to perform the #loadSnapshot call. * @name CKEDITOR.editor#loadSnapshot * @event */ - /** - * Event fired before the #getData call returns allowing additional manipulation. + * Event fired before the #getData call returns allowing additional manipulation. * @name CKEDITOR.editor#getData * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -944,7 +1010,7 @@ CKEDITOR.on( 'loaded', function() */ /** - * Event fired before the #setData call is executed allowing additional manipulation. + * Event fired before the #setData call is executed allowing additional manipulation. * @name CKEDITOR.editor#setData * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -952,8 +1018,8 @@ CKEDITOR.on( 'loaded', function() */ /** - * Event fired at the end of the #setData call is executed. Usually it's better to use the - * {@link CKEDITOR.editor.prototype.dataReady} event. + * Event fired at the end of the #setData call execution. Usually it is better to use the + * {@link CKEDITOR.editor.prototype.dataReady} event. * @name CKEDITOR.editor#afterSetData * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -961,7 +1027,7 @@ CKEDITOR.on( 'loaded', function() */ /** - * Internal event to perform the #insertHtml call + * Internal event to perform the #insertHtml call * @name CKEDITOR.editor#insertHtml * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -969,7 +1035,7 @@ CKEDITOR.on( 'loaded', function() */ /** - * Internal event to perform the #insertText call + * Internal event to perform the #insertText call * @name CKEDITOR.editor#insertText * @event * @param {CKEDITOR.editor} editor This editor instance. @@ -977,9 +1043,17 @@ CKEDITOR.on( 'loaded', function() */ /** - * Internal event to perform the #insertElement call + * Internal event to perform the #insertElement call * @name CKEDITOR.editor#insertElement * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {Object} element The element to insert. */ + +/** + * Event fired after the {@link CKEDITOR.editor#readOnly} property changes. + * @name CKEDITOR.editor#readOnly + * @event + * @since 3.6 + * @param {CKEDITOR.editor} editor This editor instance. + */