Ticket #6849: 6849.patch
| File 6849.patch, 2.0 KB (added by , 15 years ago) |
|---|
-
_source/plugins/enterkey/plugin.js
60 60 var isStartOfBlock = splitInfo.wasStartOfBlock, 61 61 isEndOfBlock = splitInfo.wasEndOfBlock; 62 62 63 var node; 63 var node, 64 newBlock, 65 newBlockDir; 64 66 65 67 // If this is a block under a list item, split it as well. (#1647) 66 if ( nextBlock )68 if ( nextBlock && ( node = nextBlock.getParent() ) && node.is( 'li' ) ) 67 69 { 68 n ode = nextBlock.getParent();69 if ( node.is( 'li' ) )70 {71 nextBlock.breakParent( node);72 nextBlock.move( nextBlock.getNext(), 1 );73 }74 } 70 nextBlock.breakParent( node ); 71 newBlock = nextBlock.clone(); 72 !CKEDITOR.env.ie && newBlock.appendBogus(); 73 newBlock.move( nextBlock.getPrevious() ); 74 nextBlock.move( nextBlock.getNext(), 1 ); 75 range.moveToElementEditStart( nextBlock ); 76 } 75 77 else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) ) 76 78 { 77 79 previousBlock.breakParent( node ); 78 range.moveToElementEditStart( previousBlock.getNext());80 newBlock = previousBlock.getNext(); 79 81 previousBlock.move( previousBlock.getPrevious() ); 82 range.moveToElementEditStart( newBlock ); 80 83 } 81 82 84 // If we have both the previous and next blocks, it means that the 83 85 // boundaries were on separated blocks, or none of them where on the 84 86 // block limits (start/end). 85 if ( !isStartOfBlock && !isEndOfBlock )87 else if ( !isStartOfBlock && !isEndOfBlock ) 86 88 { 87 89 // If the next block is an <li> with another list tree as the first 88 90 // child, we'll need to append a filler (<br>/NBSP) or the list item … … 98 100 } 99 101 else 100 102 { 101 var newBlock,102 newBlockDir;103 104 103 if ( previousBlock ) 105 104 { 106 105 // Do not enter this block if it's a header tag, or we are in
