Ticket #6282: 6282.patch
File 6282.patch, 975 bytes (added by , 14 years ago) |
---|
-
_source/plugins/styles/plugin.js
1319 1319 function applyStyle( document, remove ) 1320 1320 { 1321 1321 var selection = document.getSelection(), 1322 // Bookmark the range so we can re-select it after processing.1323 bookmarks = selection.createBookmarks(),1324 1322 ranges = selection.getRanges( true ), 1325 1323 func = remove ? this.removeFromRange : this.applyToRange, 1326 1324 range; … … 1329 1327 while ( ( range = iterator.getNextRange() ) ) 1330 1328 func.call( this, range ); 1331 1329 1332 if ( bookmarks.length == 1 && bookmarks[0].collapsed ) 1333 { 1334 selection.selectRanges( ranges ); 1335 bookmarks[0].startNode.remove(); 1336 } 1337 else 1338 selection.selectBookmarks( bookmarks ); 1339 } 1330 selection.selectRanges( ranges ); 1331 } 1340 1332 })(); 1341 1333 1342 1334 CKEDITOR.styleCommand = function( style )