X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Findent%2Fplugin.js;h=4c1406eb1040257eddeb68cb2958b179d97ff798;hp=e60a29ebb3846d4f6ecc71c49e105aced5265542;hb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7;hpb=9873d66421922c7aef8be0f5d2ab51e547b19e66 diff --git a/_source/plugins/indent/plugin.js b/_source/plugins/indent/plugin.js index e60a29e..4c1406e 100644 --- a/_source/plugins/indent/plugin.js +++ b/_source/plugins/indent/plugin.js @@ -157,7 +157,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Convert the array back to a DOM forest (yes we might have a few subtrees now). // And replace the old list with the new forest. - var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, 0 ); + var newListDir = listNode.getAttribute( 'dir' ) || listNode.getStyle( 'direction' ); + var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, newListDir ); // Avoid nested
  • after outdent even they're visually same, // recording them for later refactoring.(#3982) @@ -280,9 +281,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license ranges = selection && selection.getRanges( true ), range; + var skipBookmarks = function( node ) + { + return ! node.hasAttribute( '_cke_bookmark' ); + }; + var iterator = ranges.createIterator(); while ( ( range = iterator.getNextRange() ) ) { + // Do not indent body. (#6138) + range.shrink( CKEDITOR.SHRINK_ELEMENT ); + if ( range.endContainer.getName() == 'body' ) + range.setEndAt( range.endContainer.getLast( skipBookmarks ), CKEDITOR.POSITION_BEFORE_END ); + var startContainer = range.startContainer, endContainer = range.endContainer, rangeRoot = range.getCommonAncestor(),