X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Feditor_basic.js;h=e54f48003e064c57deca21ceed125592703ae33e;hp=cb0963e2457615b02e6e9167b5b70186bab1a58c;hb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d;hpb=8761695d9b70afe75905deaac88f78c1f8aeb32d diff --git a/_source/core/editor_basic.js b/_source/core/editor_basic.js index cb0963e..e54f480 100644 --- a/_source/core/editor_basic.js +++ b/_source/core/editor_basic.js @@ -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 =