Ticket #6588: 6588_3.patch

File 6588_3.patch, 1.5 KB (added by WebSpellChecker.net, 13 years ago)
  • _source/plugins/scayt/plugin.js

     
    244244                                        {
    245245                                                span : function( element )
    246246                                                {
    247                                                         if ( element.attributes.scayt_word && element.attributes.scaytid )
     247                                                        if ( element.attributes['data-scayt_word'] && element.attributes['data-scaytid'] )
    248248                                                        {
    249249                                                                delete element.name;    // Write children, but don't write this node.
    250250                                                                return element;
     
    505505                {
    506506                        var moreSuggestions = {},
    507507                                mainSuggestions = {};
    508 
     508                       
     509                        // Delete span[data-scaytid] when text pasting in editor (#6588)
     510                        var dataProcessor = editor.dataProcessor;
     511                        var addDataFilterRules = {
     512                                elements : {
     513                                        span : function( element ){
     514                                                var attrs = element.attributes;
     515                                                if (attrs['data-scaytid'] != undefined)
     516                                                        delete element.name;
     517                                        }
     518                                }
     519                        };
     520                        dataProcessor.dataFilter.addRules( addDataFilterRules );
     521                       
    509522                        // Scayt command.
    510523                        var command = editor.addCommand( commandName, commandDefinition );
    511524
     
    788801                        var elementsPathFilters,
    789802                                        scaytFilter = function( element )
    790803                                        {
    791                                                 if ( element.hasAttribute( 'scaytid' ) )
     804                                                if ( element.hasAttribute( 'data-scaytid' ) )
    792805                                                        return false;
    793806                                        };
    794807
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy