Ticket #6957: 6957_2.patch
File 6957_2.patch, 3.3 KB (added by , 13 years ago) |
---|
-
_source/plugins/find/dialogs/find.js
71 71 // Style object for highlights: (#5018) 72 72 // 1. Defined as full match style to avoid compromising ordinary text color styles. 73 73 // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually. 74 var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return 0; } }, 75 editor.config.find_highlight ) ); 74 var highlightStyle = new CKEDITOR.style( 75 CKEDITOR.tools.extend( { attributes : { 'data-cke-highlight': 1 }, fullMatch : 1, ignoreReadonly : 1, childRule : function(){ return 0; } }, 76 editor.config.find_highlight, true ) ); 76 77 77 78 /** 78 79 * Iterator which walk through the specified range char by char. By -
_source/plugins/styles/plugin.js
222 222 // current style definition. 223 223 checkElementRemovable : function( element, fullMatch ) 224 224 { 225 if ( !element || element.isReadOnly() ) 225 var def = this._.definition; 226 227 if ( !element || !def.ignoreReadonly && element.isReadOnly() ) 226 228 return false; 227 229 228 var def = this._.definition, 229 attribs, 230 var attribs, 230 231 name = element.getName(); 231 232 232 233 // If the element name is the same as the style name. … … 423 424 var isUnknownElement; 424 425 425 426 // Indicates that fully selected read-only elements are to be included in the styling range. 426 var includeReadonly = def.includeReadonly; 427 var ignoreReadonly = def.ignoreReadonly, 428 includeReadonly = ignoreReadonly || def.includeReadonly; 427 429 428 430 // If the read-only inclusion is not available in the definition, try 429 431 // to get it from the document data. … … 447 449 448 450 var styleRange; 449 451 450 // Check if the boundaries are inside non stylable elements. 451 var firstUnstylable = getUnstylableParent( firstNode ), 452 lastUnstylable = getUnstylableParent( lastNode ); 452 if ( !ignoreReadonly ) 453 { 454 // Check if the boundaries are inside non stylable elements. 455 var firstUnstylable = getUnstylableParent( firstNode ), 456 lastUnstylable = getUnstylableParent( lastNode ); 453 457 454 // If the first element can't be styled, we'll start processing right455 // after its unstylable root.456 if ( firstUnstylable )457 currentNode = firstUnstylable.getNextSourceNode( true );458 // If the first element can't be styled, we'll start processing right 459 // after its unstylable root. 460 if ( firstUnstylable ) 461 currentNode = firstUnstylable.getNextSourceNode( true ); 458 462 459 // If the last element can't be styled, we'll stop processing on its 460 // unstylable root. 461 if ( lastUnstylable ) 462 lastNode = lastUnstylable; 463 // If the last element can't be styled, we'll stop processing on its 464 // unstylable root. 465 if ( lastUnstylable ) 466 lastNode = lastUnstylable; 467 } 463 468 464 469 // Do nothing if the current node now follows the last node to be processed. 465 470 if ( currentNode.getPosition( lastNode ) == CKEDITOR.POSITION_FOLLOWING )