Ticket #4764: 4764.patch

File 4764.patch, 948 bytes (added by Garry Yao, 15 years ago)
  • _source/core/editor_basic.js

     
    131131         */
    132132        CKEDITOR.editor.appendTo = function( elementOrId, config )
    133133        {
    134                 if ( typeof elementOrId != 'object' )
     134                var element = elementOrId;
     135                if ( typeof element != 'object' )
    135136                {
    136                         elementOrId = document.getElementById( elementOrId );
     137                        element = document.getElementById( elementOrId );
    137138
    138                         if ( !elementOrId )
     139                        if( !element )
    139140                                throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.';
    140141                }
    141142
    142143                // Create the editor instance.
    143                 return new CKEDITOR.editor( config, elementOrId, CKEDITOR.ELEMENT_MODE_APPENDTO );
     144                return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO );
    144145        };
    145146
    146147        CKEDITOR.editor.prototype =
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy