Ticket #6588: 6588_2.patch

File 6588_2.patch, 1.2 KB (added by Garry Yao, 13 years ago)
  • _source/plugins/scayt/plugin.js

     
    4646                        oParams.customDictionaryIds = config.scayt_customDictionaryIds || '';
    4747                        oParams.userDictionaryName = config.scayt_userDictionaryName || '';
    4848                        oParams.sLang = config.scayt_sLang || 'en_US';
     49                        oParams.addClass = true;
    4950
    5051                        // Introduce SCAYT onLoad callback. (#5632)
    5152                        oParams.onLoad = function()
     
    505506                {
    506507                        var moreSuggestions = {},
    507508                                mainSuggestions = {};
    508 
     509                       
     510                        // Delete misspelled marker when pasting in editor. (#6588)
     511                        var dataProcessor = editor.dataProcessor;
     512                        var addDataFilterRules =
     513                        {
     514                                elements :
     515                                {
     516                                        span : function( element )
     517                                        {
     518                                                var attrs = element.attributes;
     519                                                if ( attrs[ 'class' ] && attrs[ 'class' ].indexOf( 'scayt-' ) != -1 )
     520                                                        delete element.name;
     521                                        }
     522                                }
     523                        };
     524                        dataProcessor.dataFilter.addRules( addDataFilterRules );
     525                       
    509526                        // Scayt command.
    510527                        var command = editor.addCommand( commandName, commandDefinition );
    511528
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy