Ticket #5181: 5181_2.patch

File 5181_2.patch, 1.7 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    329329
    330330                                        // The script that launches the bootstrap logic on 'domReady', so the document
    331331                                        // is fully editable even before the editing iframe is fully loaded (#4455).
     332                                        var contentDomReadyHandler = CKEDITOR.tools.addFunction( contentDomReady );
    332333                                        var activationScript =
    333334                                                '<script id="cke_actscrpt" type="text/javascript" cke_temp="1">' +
    334335                                                        ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) +
    335                                                         'parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
     336                                                        'window.parent.CKEDITOR.tools.callFunction( ' + contentDomReadyHandler + ', window );' +
    336337                                                '</script>';
    337338
    338339                                        // Editing area bootstrap code.
    339                                         var contentDomReady = function( domWindow )
     340                                        function contentDomReady( domWindow )
    340341                                        {
    341342                                                if ( !frameLoaded )
    342343                                                        return;
     
    351352                                                var script = domDocument.getElementById( "cke_actscrpt" );
    352353                                                script.parentNode.removeChild( script );
    353354
    354                                                 delete CKEDITOR._[ 'contentDomReady' + editor.name ];
     355                                                CKEDITOR.tools.removeFunction( contentDomReadyHandler );
    355356
    356357                                                body.spellcheck = !editor.config.disableNativeSpellChecker;
    357358
     
    671672
    672673                                                                data += activationScript;
    673674
    674                                                                 CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
    675675
    676676                                                                // The iframe is recreated on each call of setData, so we need to clear DOM objects
    677677                                                                this.onDispose();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy