Ticket #3257: 3275.patch
File 3275.patch, 1.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/list/plugin.js
228 228 newList.listNode.replace( groupObj.root ); 229 229 } 230 230 231 var headerTagRegex = /^h[1-6]$/; 232 231 233 function createList( editor, groupObj, listsCreated ) 232 234 { 233 235 var contents = groupObj.contents, … … 279 281 { 280 282 var contentBlock = listContents.shift(), 281 283 listItem = doc.createElement( 'li' ); 282 contentBlock.moveChildren( listItem ); 283 contentBlock.remove(); 284 285 // Preserve heading structure when converting to list item. (#5271) 286 if ( headerTagRegex.test( contentBlock.getName() ) ) 287 { 288 var tmp = new CKEDITOR.dom.documentFragment( contentBlock.getDocument() ); 289 tmp.append( contentBlock ); 290 contentBlock = tmp; 291 } 292 293 if ( contentBlock.type == CKEDITOR.NODE_ELEMENT ) 294 { 295 contentBlock.copyAttributes( listItem ); 296 contentBlock.remove(); 297 } 298 299 contentBlock.moveChildren( listItem ); 284 300 listItem.appendTo( listNode ); 285 301 286 302 // Append a bogus BR to force the LI to render at full height