Ticket #3257: 3257_2.patch
File 3257_2.patch, 1.0 KB (added by , 14 years ago) |
---|
-
_source/plugins/list/plugin.js
234 234 newList.listNode.replace( groupObj.root ); 235 235 } 236 236 237 var headerTagRegex = /^h[1-6]$/; 238 237 239 function createList( editor, groupObj, listsCreated ) 238 240 { 239 241 var contents = groupObj.contents, … … 285 287 { 286 288 var contentBlock = listContents.shift(), 287 289 listItem = doc.createElement( 'li' ); 288 contentBlock.moveChildren( listItem ); 289 contentBlock.remove(); 290 291 // Preserve heading structure when converting to list item. (#5271) 292 if ( headerTagRegex.test( contentBlock.getName() ) ) 293 contentBlock.appendTo( listItem ); 294 else 295 { 296 contentBlock.copyAttributes( listItem ); 297 contentBlock.moveChildren( listItem ); 298 contentBlock.remove(); 299 } 300 290 301 listItem.appendTo( listNode ); 291 302 292 303 // Append a bogus BR to force the LI to render at full height