X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Feditor_basic.js;h=116e6807fd2045ed4c66cea5c5d70634180ed614;hb=941b0a9ba4e673e292510d80a5a86806994b8ea6;hp=cb0963e2457615b02e6e9167b5b70186bab1a58c;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/core/editor_basic.js b/_source/core/editor_basic.js index cb0963e..116e680 100644 --- a/_source/core/editor_basic.js +++ b/_source/core/editor_basic.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -131,16 +131,17 @@ if ( !CKEDITOR.editor ) */ CKEDITOR.editor.appendTo = function( elementOrId, config ) { - if ( typeof elementOrId != 'object' ) + var element = elementOrId; + if ( typeof element != 'object' ) { - elementOrId = document.getElementById( elementOrId ); + element = document.getElementById( elementOrId ); - if ( !elementOrId ) + if( !element ) throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; } // Create the editor instance. - return new CKEDITOR.editor( config, elementOrId, CKEDITOR.ELEMENT_MODE_APPENDTO ); + return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO ); }; CKEDITOR.editor.prototype =