Ticket #3555: 3555.patch

File 3555.patch, 1.1 KB (added by Artur Formella, 15 years ago)
  • _source/plugins/scayt/plugin.js

     
    4242                        try {
    4343                                scayt_control.setDisabled( scayt_control.paused === false );                            // I really don't know why it couse JS error in IE
    4444                        } catch (e) {}
     45                        editor.fire( 'showScaytState' );
    4546                };
    4647
    4748                editor.on( 'contentDom', createInstnce )                // Get the iframe somehow.
     
    9899                        });
    99100
    100101                if ( editor.document )
    101                 {
    102102                        createInstnce();
    103                         editor.fire( 'showScaytState' );
    104                 }
    105103        };
    106104
    107105        CKEDITOR.plugins.scayt =
     
    438436
    439437                        // Start plugin
    440438                        if ( editor.config.scayt_autoStartup )
     439                        {
     440                                var showInitialState = function()
     441                                {
     442                                        editor.removeListener( 'showScaytState', showInitialState );
     443                                        command.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
     444                                };
     445                                editor.on( 'showScaytState', showInitialState );
     446
    441447                                plugin.loadEngine( editor );
     448                        }
    442449                }
    443450        });
    444451})();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy