IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
142 | 142 | { |
143 | 143 | listArray[ i ].indent += indentOffset; |
144 | 144 | // Make sure the newly created sublist get a brand-new element of the same type. (#5372) |
145 | | var listRoot = listArray[ i ].parent; |
146 | | listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); |
| 145 | if ( indentOffset > 0 ) |
| 146 | { |
| 147 | var listRoot = listArray[ i ].parent; |
| 148 | listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); |
| 149 | } |
147 | 150 | } |
148 | 151 | |
149 | 152 | for ( i = lastItem.getCustomData( 'listarray_index' ) + 1 ; |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
| 34 | // Inheirt inline styles from another element. |
| 35 | function inheirtInlineStyles( parent, el ) |
| 36 | { |
| 37 | var style = parent.getAttribute( 'style' ); |
| 38 | |
| 39 | // Put parent styles before child styles. |
| 40 | style && el.setAttribute( 'style', |
| 41 | style.replace( /([^;])$/, '$1;' ) + |
| 42 | ( el.getAttribute( 'style' ) || '' ) ); |
| 43 | } |
| 44 | |
34 | 45 | CKEDITOR.plugins.list = { |
35 | 46 | /* |
36 | 47 | * Convert a DOM list tree into a data structure that is easier to |
… |
… |
|
108 | 119 | paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' ); |
109 | 120 | while ( 1 ) |
110 | 121 | { |
111 | | var item = listArray[ currentIndex ]; |
| 122 | var item = listArray[ currentIndex ], |
| 123 | itemParent = item.parent; |
112 | 124 | |
113 | 125 | orgDir = item.element.getDirection( 1 ); |
114 | 126 | |
… |
… |
|
146 | 158 | } |
147 | 159 | else if ( item.indent == -1 && !baseIndex && item.grandparent ) |
148 | 160 | { |
| 161 | // We're leaving this parent list, inherit it's inline styles. |
| 162 | var listNode = itemParent.clone(); |
| 163 | if ( listNode.hasAttribute( 'style' ) ) |
| 164 | { |
| 165 | listNode.removeStyle( 'list-style-type' ); |
| 166 | inheirtInlineStyles( listNode, item.element ); |
| 167 | } |
| 168 | |
149 | 169 | if ( listNodeNames[ item.grandparent.getName() ] ) |
150 | 170 | currentListItem = item.element.clone( false, true ); |
151 | 171 | else |
… |
… |
|
171 | 191 | if ( dirLoose && !child.getDirection() ) |
172 | 192 | child.setAttribute( 'dir', orgDir ); |
173 | 193 | |
174 | | // Merge into child styles. |
175 | | style && child.setAttribute( 'style', |
176 | | style.replace( /([^;])$/, '$1;') + |
177 | | ( child.getAttribute( 'style' ) || '' ) ); |
| 194 | inheirtInlineStyles( li, child ); |
178 | 195 | |
179 | 196 | className && child.addClass( className ); |
180 | 197 | } |