Ticket #3982: 3982.patch
File 3982.patch, 2.4 KB (added by , 15 years ago) |
---|
-
_source/plugins/indent/plugin.js
144 144 // Convert the array back to a DOM forest (yes we might have a few subtrees now). 145 145 // And replace the old list with the new forest. 146 146 var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, 0 ); 147 148 // Avoid nested <li> after outdent even they're visually same, 149 // recording them for later refactoring.(#3982) 150 if ( this.name == 'outdent' ) 151 { 152 var parentLiElement; 153 if ( ( parentLiElement = listNode.getParent() ) && parentLiElement.is( 'li' ) ) 154 { 155 var children = newList.listNode.getChildren(), 156 pendingLis = [], 157 count = children.count(), 158 child; 159 for ( var i = count - 1 ; i >= 0 ; i-- ) 160 if( ( child = children.getItem( i ) ) && child.is && child.is( 'li' ) ) 161 pendingLis.push( child ); 162 } 163 } 164 147 165 if ( newList ) 148 166 newList.listNode.replace( listNode ); 149 167 168 // Move the nested <li> to be appeared after the parent. 169 if ( pendingLis && pendingLis.length ) 170 for ( var i = 0; i < pendingLis.length ; i++ ) 171 { 172 var li = pendingLis[ i ], 173 followingList = li; 174 // Nest preceding <ul>/<ol> inside current <li> if any. 175 while( ( followingList = followingList.getNext() ) && 176 followingList.is && 177 followingList.getName() in listNodeNames ) 178 li.append( followingList ); 179 li.insertAfter( parentLiElement ); 180 } 181 150 182 // Clean up the markers. 151 183 CKEDITOR.dom.element.clearAllMarkers( database ); 152 184 } -
CHANGES.html
152 152 <li><a href="http://dev.fckeditor.net/ticket/3959">#3959</a> : Pasting styled text from word result in content lost.</li> 153 153 <li><a href="http://dev.fckeditor.net/ticket/3793">#3793</a> : Combined images into sprites.</li> 154 154 <li><a href="http://dev.fckeditor.net/ticket/3783">#3783</a> : Fixed indenting command in table cells create collapsed paragraph.</li> 155 <li><a href="http://dev.fckeditor.net/ticket/3982">#3982</a> : Fixed enterKey on empty list item result in weird dom structure.</li> 155 156 </ul> 156 157 <h3> 157 158 CKEditor 3.0 RC</h3>