Ticket #3730: 3730.patch
File 3730.patch, 2.3 KB (added by , 15 years ago) |
---|
-
_source/plugins/domiterator/plugin.js
19 19 20 20 this.range = range; 21 21 this.forceBrBreak = false; 22 23 // Whether include <br>s into the enlarged range.(#3730). 24 this.enlargeBr = true; 22 25 this.enforceRealBlocks = false; 23 26 24 27 this._ || ( this._ = {} ); … … 45 48 if ( !this._.lastNode ) 46 49 { 47 50 range = this.range.clone(); 48 range.enlarge( this.forceBrBreak ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS ); 51 range.enlarge( this.forceBrBreak || !this.enlargeBr ? 52 CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS ); 49 53 50 54 var walker = new CKEDITOR.dom.walker( range ), 51 55 ignoreBookmarkTextEvaluator = CKEDITOR.dom.walker.bookmark( true, true ); … … 241 245 // If the range doesn't includes the entire contents of the 242 246 // block, we must split it, isolating the range in a dedicated 243 247 // block. 244 if ( !range.checkStartOfBlock() || !range.checkEndOfBlock() )248 if ( this.enlargeBr && !( range.checkStartOfBlock() && range.checkEndOfBlock() ) ) 245 249 { 246 250 // The resulting block will be a clone of the current one. 247 251 block = block.clone( false ); -
_source/plugins/indent/plugin.js
153 153 154 154 function indentBlock( editor, range ) 155 155 { 156 var iterator = range.createIterator(); 156 var iterator = range.createIterator(), 157 enterMode = editor.config.enterMode; 157 158 iterator.enforceRealBlocks = true; 158 159 iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR; 159 160 var block; 160 while ( ( block = iterator.getNextParagraph() ) )161 {162 161 162 // Use 'div' as default grouping tag for multiple lines breaked by <br>. 163 while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_BR ? 'div' : 'p' ) ) ) 164 { 163 165 if ( this.useIndentClasses ) 164 166 { 165 167 // Transform current class name to indent step index.