Ticket #3312: 3312_3.patch
File 3312_3.patch, 3.1 KB (added by , 16 years ago) |
---|
-
_source/plugins/enterkey/plugin.js
57 57 { 58 58 // Get the range for the current selection. 59 59 range = range || getRange( editor ); 60 61 // splitBlock may change the range later. 62 var orginalRange = range.clone(); 60 63 61 64 var doc = range.document; 62 65 … … 78 81 79 82 var node; 80 83 81 // If this is a block under a list item, split it as well. (#1647) 84 // 1. If this is a block under a list item, split it as well. (#1647) 85 // 2. Exit the whole list if it's the last empty first-level list item. (#3312) 82 86 if ( nextBlock ) 83 87 { 84 88 node = nextBlock.getParent(); … … 94 98 range.moveToElementEditStart( previousBlock.getNext() ); 95 99 previousBlock.move( previousBlock.getPrevious() ); 96 100 } 97 101 else if ( ( node = previousBlock ) && node.is( 'li' ) 102 && node.getParent().is( 'ul', 'ol' ) 103 && !node.getNext() 104 && !CKEDITOR.tools.trim( node.getText() ).length ) 105 { 106 // Create marker node for recording the editable position before list outdentation. 107 if( !CKEDITOR.env.ie ) 108 { 109 var markerNode = 110 CKEDITOR.dom.element.createFromHtml( '<span id="_cke_marker_editable" > </span>' ); 111 node.append( markerNode ); 112 } 113 var listNode = node.getParent(); 114 listNode = editor.plugins.indent.outdentList( editor, orginalRange, listNode ); 115 if ( !CKEDITOR.env.ie ) 116 { 117 range.moveToElementEditStart( 118 ( markerNode = editor.document.getById( '_cke_marker_editable' ) ).getParent() ); 119 markerNode.remove(); 120 range.select(); 121 } 122 return; 123 } 98 124 // If we have both the previous and next blocks, it means that the 99 125 // boundaries were on separated blocks, or none of them where on the 100 126 // block limits (start/end). -
_source/plugins/indent/plugin.js
275 275 // Register the state changing handlers. 276 276 editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, indent ) ); 277 277 editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, outdent ) ); 278 279 // Register 'outdent list' as public editor instance function. 280 editor.plugins.indent.outdentList= CKEDITOR.tools.bind( indentList, outdent ); 281 278 282 }, 279 283 280 284 requires : [ 'domiterator', 'list' ] … … 279 283 280 284 requires : [ 'domiterator', 'list' ] 281 285 } ); 286 282 287 })(); 283 288 284 289 CKEDITOR.tools.extend( CKEDITOR.config, -
_source/core/dom/element.js
551 551 */ 552 552 getText : function() 553 553 { 554 return this.$.textContent || this.$.innerText ;554 return this.$.textContent || this.$.innerText || ''; 555 555 }, 556 556 557 557 /**