X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Flist%2Fplugin.js;h=b0d5e8cf63103dd8f58b52da3e361eb19b99c780;hp=0cd962f136f270fa780c3631f915121b4af7dfba;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66 diff --git a/_source/plugins/list/plugin.js b/_source/plugins/list/plugin.js index 0cd962f..b0d5e8c 100644 --- a/_source/plugins/list/plugin.js +++ b/_source/plugins/list/plugin.js @@ -299,8 +299,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var contentBlock = listContents.shift(), listItem = doc.createElement( 'li' ); - // Preserve heading structure when converting to list item. (#5271) - if ( headerTagRegex.test( contentBlock.getName() ) ) + // Preserve preformat block and heading structure when converting to list item. (#5335) (#5271) + if ( contentBlock.is( 'pre' ) || headerTagRegex.test( contentBlock.getName() ) ) contentBlock.appendTo( listItem ); else { @@ -312,13 +312,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license contentBlock.copyAttributes( listItem ); contentBlock.moveChildren( listItem ); contentBlock.remove(); + + // Append a bogus BR to force the LI to render at full height + if ( !CKEDITOR.env.ie ) + listItem.appendBogus(); } listItem.appendTo( listNode ); - - // Append a bogus BR to force the LI to render at full height - if ( !CKEDITOR.env.ie ) - listItem.appendBogus(); } if ( dir ) @@ -424,7 +424,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var paragraph = doc.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' : ( editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'br' ) ); paragraph.appendTo( body ); - ranges = [ new CKEDITOR.dom.range( doc ) ]; + ranges = new CKEDITOR.dom.rangeList( [ new CKEDITOR.dom.range( doc ) ] ); // IE exception on inserting anything when anchor inside
. if ( paragraph.is( 'br' ) ) {