Ticket #5462: 5462.patch
File 5462.patch, 1.6 KB (added by , 13 years ago) |
---|
-
_source/plugins/styles/plugin.js
403 403 404 404 // Bookmark the range so we can re-select it after processing. 405 405 var bookmark = range.createBookmark(); 406 bookmark.startNode.setAttribute( '_cke_bookmark', 1 ); // Avoid the bookmark nodes from been merged. 406 407 407 408 // Expand the range. 408 409 range.enlarge( CKEDITOR.ENLARGE_ELEMENT ); 409 410 range.trim(); 410 411 411 // Remove all style conflictions within the range,412 // e.g. style="color:red" is conflicting with style="color:blue".413 var enlargedBookmark = range.createBookmark();414 this.removeConflictsFromRange( range );415 range.moveToBookmark( enlargedBookmark );416 417 412 // Get the first node to be processed and the last, which concludes the 418 413 // processing. 419 414 var boundaryNodes = range.getBoundaryNodes(); … … 578 573 // Move the contents of the range to the style element. 579 574 styleRange.extractContents().appendTo( styleNode ); 580 575 576 var bm = styleRange.createBookmark(); 577 styleRange.selectNodeContents( bm.startNode ); 578 styleRange.enlarge( CKEDITOR.ENLARGE_ELEMENT ); 579 580 // Remove all style conflictions within the range, 581 // e.g. style="color:red" is conflicting with style="color:blue". 582 this.removeConflictsFromRange( styleRange ); 583 styleRange.moveToBookmark( bm ); 584 581 585 // Insert it into the range position (it is collapsed after 582 586 // extractContents. 583 587 styleRange.insertNode( styleNode );