IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
784 | 784 | CKEDITOR.dtd[ node.getName() ][ '#' ]; |
785 | 785 | } |
786 | 786 | |
787 | | // Merge the visual line content at the cursor range into the block. |
| 787 | // Join visually two block lines. |
788 | 788 | function joinNextLineToCursor( editor, cursor, nextCursor ) |
789 | 789 | { |
790 | 790 | editor.fire( 'saveSnapshot' ); |
… |
… |
|
798 | 798 | |
799 | 799 | // Kill original bogus; |
800 | 800 | var currentPath = new CKEDITOR.dom.elementPath( cursor.startContainer ); |
801 | | var currentLi = currentPath.lastElement.getAscendant( 'li', 1 ); |
| 801 | var currentBlock = currentPath.lastElement.getAscendant( 'li', 1 ) || currentPath.block; |
802 | 802 | |
803 | 803 | var bogus = currentPath.block.getBogus(); |
804 | 804 | bogus && bogus.remove(); |
… |
… |
|
815 | 815 | else |
816 | 816 | cursor.startContainer.append( frag ); |
817 | 817 | |
818 | | var nextPath = new CKEDITOR.dom.elementPath( nextCursor.startContainer ); |
819 | | var nextLi = nextCursor.startContainer.getAscendant( 'li', 1 ); |
| 818 | var nextPath = new CKEDITOR.dom.elementPath( nextCursor.startContainer ), |
| 819 | nextLi = nextCursor.startContainer.getAscendant( 'li', 1 ); |
820 | 820 | |
821 | 821 | // Move the sub list nested in the next list item. |
822 | 822 | if ( nextLi ) |
… |
… |
|
825 | 825 | if ( sublist ) |
826 | 826 | { |
827 | 827 | // If next line is in the sub list of the current list item. |
828 | | if ( currentLi.contains( nextLi ) ) |
| 828 | if ( currentBlock.contains( nextLi ) ) |
829 | 829 | { |
830 | 830 | mergeChildren( sublist, nextLi.getParent(), nextLi ); |
831 | 831 | sublist.remove(); |
832 | 832 | } |
833 | 833 | // Migrate the sub list to current list item. |
834 | 834 | else |
835 | | currentLi.append( sublist ); |
| 835 | currentBlock.append( sublist ); |
836 | 836 | } |
837 | 837 | } |
838 | 838 | |
… |
… |
|
922 | 922 | var body = editor.document.getBody(); |
923 | 923 | var walker = new CKEDITOR.dom.walker( range.clone() ); |
924 | 924 | walker.evaluator = function( node ) { return nonEmpty( node ) && !blockBogus( node ); }; |
| 925 | walker.guard = function( node, isOut ) { return !( isOut && node.type == CKEDITOR.NODE_ELEMENT && node.is( 'table' ) ) }; |
925 | 926 | |
926 | 927 | var cursor = range.clone(); |
927 | 928 | |
… |
… |
|
976 | 977 | } |
977 | 978 | else |
978 | 979 | { |
979 | | var li = range.startContainer.getAscendant( 'li', 1 ); |
| 980 | var next, |
| 981 | nextLine, |
| 982 | li = range.startContainer.getAscendant( 'li', 1 ); |
| 983 | |
980 | 984 | if ( li ) |
981 | 985 | { |
982 | 986 | walker.range.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); |
… |
… |
|
1007 | 1011 | if ( isAtEnd && next ) |
1008 | 1012 | { |
1009 | 1013 | // Put cursor range there. |
1010 | | var nextLine = range.clone(); |
| 1014 | nextLine = range.clone(); |
1011 | 1015 | nextLine.moveToElementEditStart( next ); |
1012 | 1016 | |
| 1017 | joinNextLineToCursor( editor, cursor, nextLine ); |
| 1018 | evt.cancel(); |
| 1019 | } |
| 1020 | } |
| 1021 | else |
| 1022 | { |
| 1023 | // Handle Del key pressed before list. |
| 1024 | walker.range.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); |
| 1025 | next = walker.next(); |
| 1026 | if ( next && next.type == CKEDITOR.NODE_ELEMENT && |
| 1027 | next.getName() in listNodeNames ) |
| 1028 | { |
| 1029 | // Put cursor range there. |
| 1030 | nextLine = range.clone(); |
| 1031 | nextLine.moveToElementEditStart( next ); |
1013 | 1032 | joinNextLineToCursor( editor, cursor, nextLine ); |
1014 | 1033 | evt.cancel(); |
1015 | 1034 | } |