X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Feditor_basic.js;h=ec90bf72107e7834fc36ae5657487f0b467d3ab1;hb=9873d66421922c7aef8be0f5d2ab51e547b19e66;hp=116e6807fd2045ed4c66cea5c5d70634180ed614;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/core/editor_basic.js b/_source/core/editor_basic.js index 116e680..ec90bf7 100644 --- a/_source/core/editor_basic.js +++ b/_source/core/editor_basic.js @@ -36,16 +36,18 @@ if ( !CKEDITOR.editor ) * instance. * @param {Number} [mode] The mode in which the element is linked to this * instance. + * @param {String} [data] Since 3.3. Initial value for the instance. * @augments CKEDITOR.event * @example */ - CKEDITOR.editor = function( instanceConfig, element, mode ) + CKEDITOR.editor = function( instanceConfig, element, mode, data ) { this._ = { // Save the config to be processed later by the full core code. instanceConfig : instanceConfig, - element : element + element : element, + data : data }; /** @@ -126,22 +128,23 @@ if ( !CKEDITOR.editor ) * @param {Object} [config] The specific configurations to apply to this * editor instance. Configurations set here will override global CKEditor * settings. + * @param {String} [data] Since 3.3. Initial value for the instance. * @returns {CKEDITOR.editor} The editor instance created. * @example */ - CKEDITOR.editor.appendTo = function( elementOrId, config ) + CKEDITOR.editor.appendTo = function( elementOrId, config, data ) { var element = elementOrId; if ( typeof element != 'object' ) { element = document.getElementById( elementOrId ); - if( !element ) + if ( !element ) throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; } // Create the editor instance. - return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO ); + return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO, data ); }; CKEDITOR.editor.prototype =