var contentBlock = listContents.shift(),\r
listItem = doc.createElement( 'li' );\r
\r
- // Preserve heading structure when converting to list item. (#5271)\r
- if ( headerTagRegex.test( contentBlock.getName() ) )\r
+ // Preserve preformat block and heading structure when converting to list item. (#5335) (#5271)\r
+ if ( contentBlock.is( 'pre' ) || headerTagRegex.test( contentBlock.getName() ) )\r
contentBlock.appendTo( listItem );\r
else\r
{\r
contentBlock.copyAttributes( listItem );\r
contentBlock.moveChildren( listItem );\r
contentBlock.remove();\r
+\r
+ // Append a bogus BR to force the LI to render at full height\r
+ if ( !CKEDITOR.env.ie )\r
+ listItem.appendBogus();\r
}\r
\r
listItem.appendTo( listNode );\r
-\r
- // Append a bogus BR to force the LI to render at full height\r
- if ( !CKEDITOR.env.ie )\r
- listItem.appendBogus();\r
}\r
\r
if ( dir )\r
var paragraph = doc.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' :\r
( editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'br' ) );\r
paragraph.appendTo( body );\r
- ranges = [ new CKEDITOR.dom.range( doc ) ];\r
+ ranges = new CKEDITOR.dom.rangeList( [ new CKEDITOR.dom.range( doc ) ] );\r
// IE exception on inserting anything when anchor inside <br>.\r
if ( paragraph.is( 'br' ) )\r
{\r