Ticket #6588: 6588_4.patch
File 6588_4.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; … … 503 503 504 504 init : function( editor ) 505 505 { 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 506 522 var moreSuggestions = {}, 507 523 mainSuggestions = {}; 508 509 524 // Scayt command. 510 525 var command = editor.addCommand( commandName, commandDefinition ); 511 526 … … 788 803 var elementsPathFilters, 789 804 scaytFilter = function( element ) 790 805 { 791 if ( element.hasAttribute( ' scaytid' ) )806 if ( element.hasAttribute( 'data-scaytid' ) ) 792 807 return false; 793 808 }; 794 809