Ticket #6588: 6588_4.patch

File 6588_4.patch, 1.5 KB (added by Sa'ar Zac Elias, 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;
     
    503503
    504504                init : function( editor )
    505505                {
     506                        // Delete span[data-scaytid] when text pasting in editor (#6588)
     507                        var dataFilter = editor.dataProcessor && editor.dataProcessor.dataFilter;
     508                        var dataFilterRules =
     509                        {
     510                                elements :
     511                                {
     512                                        span : function( element )
     513                                        {
     514                                                var attrs = element.attributes;
     515                                                if ( attrs && attrs[ 'data-scaytid' ] )
     516                                                        delete element.name;
     517                                        }
     518                                }
     519                        };
     520                        dataFilter && dataFilter.addRules( dataFilterRules );
     521
    506522                        var moreSuggestions = {},
    507523                                mainSuggestions = {};
    508 
    509524                        // Scayt command.
    510525                        var command = editor.addCommand( commandName, commandDefinition );
    511526
     
    788803                        var elementsPathFilters,
    789804                                        scaytFilter = function( element )
    790805                                        {
    791                                                 if ( element.hasAttribute( 'scaytid' ) )
     806                                                if ( element.hasAttribute( 'data-scaytid' ) )
    792807                                                        return false;
    793808                                        };
    794809
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy