JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0.2
[ckeditor.git] / _source / core / editor_basic.js
index cb0963e..e54f480 100644 (file)
@@ -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