JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1
[ckeditor.git] / _source / core / editor_basic.js
index cb0963e..116e680 100644 (file)
@@ -1,5 +1,5 @@
 /*\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
@@ -131,16 +131,17 @@ if ( !CKEDITOR.editor )
         */\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