Ticket #4944: 4944.patch
File 4944.patch, 1.5 KB (added by , 13 years ago) |
---|
-
_source/plugins/pastefromword/filter/default.js
228 228 !listBaseIndent && ( listBaseIndent = value ); 229 229 230 230 // Indent level start with one. 231 attrs[ 'cke:indent' ] = Math.floor( value / listBaseIndent ) + 1; 231 attrs[ 'cke:indent' ] = Math.floor( value / listBaseIndent ); 232 232 233 } ] 233 234 ] )( attrs.style, element ) || '' ; 234 235 } … … 400 401 401 402 if ( !list ) 402 403 { 403 parentList =list = new CKEDITOR.htmlParser.element( listType );404 list = new CKEDITOR.htmlParser.element( listType ); 404 405 list.add( listItem ); 405 406 children[ i ] = list; 406 407 } … … 408 409 { 409 410 if ( listItemIndent > indent ) 410 411 { 411 parentList = list;412 412 list = new CKEDITOR.htmlParser.element( listType ); 413 413 list.add( listItem ); 414 414 lastListItem.add( list ); 415 415 } 416 416 else if ( listItemIndent < indent ) 417 417 { 418 list = parentList; 419 parentList = list.parent ? list.parent.parent : list; 418 // There might be a negative gap between two list levels. (#4944) 419 var diff = indent - listItemIndent; 420 while( diff-- ) 421 list = list.parent.parent; 422 420 423 list.add( listItem ); 421 424 } 422 425 else