/*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
* instance.\r
* @param {Number} [mode] The mode in which the element is linked to this\r
* instance.\r
+ * @param {String} [data] Since 3.3. Initial value for the instance.\r
* @augments CKEDITOR.event\r
* @example\r
*/\r
- CKEDITOR.editor = function( instanceConfig, element, mode )\r
+ CKEDITOR.editor = function( instanceConfig, element, mode, data )\r
{\r
this._ =\r
{\r
// Save the config to be processed later by the full core code.\r
instanceConfig : instanceConfig,\r
- element : element\r
+ element : element,\r
+ data : data\r
};\r
\r
/**\r
* @param {Object} [config] The specific configurations to apply to this\r
* editor instance. Configurations set here will override global CKEditor\r
* settings.\r
+ * @param {String} [data] Since 3.3. Initial value for the instance.\r
* @returns {CKEDITOR.editor} The editor instance created.\r
* @example\r
*/\r
- CKEDITOR.editor.appendTo = function( elementOrId, config )\r
+ CKEDITOR.editor.appendTo = function( elementOrId, config, data )\r
{\r
var element = elementOrId;\r
if ( typeof element != 'object' )\r
{\r
element = document.getElementById( elementOrId );\r
\r
- if( !element )\r
+ if ( !element )\r
throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.';\r
}\r
\r
// Create the editor instance.\r
- return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO );\r
+ return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO, data );\r
};\r
\r
CKEDITOR.editor.prototype =\r