Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -337,8 +337,18 @@ | ||
var attributes = child.attributes, | var attributes = child.attributes, | ||
listItemChildren = child.children, | listItemChildren = child.children, | ||
count = listItemChildren.length, | count = listItemChildren.length, | ||
first = listItemChildren[ 0 ], | |||
last = listItemChildren[ count - 1 ]; | last = listItemChildren[ count - 1 ]; | ||
|
|
||
// Converts <li><p style="_MSO_LIST_STYLES_">{...}</p></li> -> <li style="_MSO_LIST_STYLES_">{...}</li>. | |||
// The above format is what we got when pasting from Word 2010 to IE11 and possibly some others. | |||
// Existence of extra <p> tag that can be later recognized as list item (see #getRules.return.elements.p) | |||
// creates incorrect and problematic structures similar to <cke:li><cke:li>{...}</cke:li></cke:li>. (#11376) | |||
if ( first.attributes && first.attributes.style && first.attributes.style.indexOf( 'mso-list' ) > -1 ) { | |||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Reinmar
Author
Member
|
|||
child.attributes.style = first.attributes.style; | |||
first.replaceWithChildren(); | |||
} | |||
|
|||
// Move out nested list. | // Move out nested list. | ||
if ( last.name in CKEDITOR.dtd.$list ) { | if ( last.name in CKEDITOR.dtd.$list ) { | ||
element.add( last, i + 1 ); | element.add( last, i + 1 ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Isn't it better to not even have 'mso-list' style set at all, which is done in code, breaks the editor and requires this sort of fixing?