/*\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
*/\r
CKEDITOR.editor.appendTo = function( elementOrId, config )\r
{\r
- if ( typeof elementOrId != 'object' )\r
+ var element = elementOrId;\r
+ if ( typeof element != 'object' )\r
{\r
- elementOrId = document.getElementById( elementOrId );\r
+ element = document.getElementById( elementOrId );\r
\r
- if ( !elementOrId )\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, elementOrId, CKEDITOR.ELEMENT_MODE_APPENDTO );\r
+ return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO );\r
};\r
\r
CKEDITOR.editor.prototype =\r