Ticket #6588: 6588_3.patch
File 6588_3.patch, 1.5 KB (added by , 13 years ago) |
---|
-
_source/plugins/scayt/plugin.js
244 244 { 245 245 span : function( element ) 246 246 { 247 if ( element.attributes .scayt_word && element.attributes.scaytid)247 if ( element.attributes['data-scayt_word'] && element.attributes['data-scaytid'] ) 248 248 { 249 249 delete element.name; // Write children, but don't write this node. 250 250 return element; … … 505 505 { 506 506 var moreSuggestions = {}, 507 507 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 509 522 // Scayt command. 510 523 var command = editor.addCommand( commandName, commandDefinition ); 511 524 … … 788 801 var elementsPathFilters, 789 802 scaytFilter = function( element ) 790 803 { 791 if ( element.hasAttribute( ' scaytid' ) )804 if ( element.hasAttribute( 'data-scaytid' ) ) 792 805 return false; 793 806 }; 794 807