422 | | for ( var i = 0 ; i < path.elements.length ; i++ ) |
423 | | { |
424 | | var element = path.elements[i]; |
425 | | if ( listNodeNames[ element.getName() ] ) |
426 | | { |
427 | | // If we've encountered a list inside a block limit |
428 | | // The last group object of the block limit element should |
429 | | // no longer be valid. Since paragraphs after the list |
430 | | // should belong to a different group of paragraphs before |
431 | | // the list. (Bug #1309) |
432 | | blockLimit.removeCustomData( 'list_group_object' ); |
| 424 | for ( var i = 0 ; i < path.elements.length ; i++ ) |
| 425 | { |
| 426 | var element = path.elements[i]; |
| 427 | if ( block.getName() == 'td' ) |
| 428 | break; |
| 429 | |
| 430 | if ( listNodeNames[ element.getName() ] ) |
| 431 | { |
| 432 | // If we've encountered a list inside a block limit |
| 433 | // The last group object of the block limit element should |
| 434 | // no longer be valid. Since paragraphs after the list |
| 435 | // should belong to a different group of paragraphs before |
| 436 | // the list. (Bug #1309) |
| 437 | blockLimit.removeCustomData( 'list_group_object' ); |
434 | | var groupObj = element.getCustomData( 'list_group_object' ); |
435 | | if ( groupObj ) |
436 | | groupObj.contents.push( block ); |
437 | | else |
438 | | { |
439 | | groupObj = { root : element, contents : [ block ] }; |
440 | | listGroups.push( groupObj ); |
441 | | CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj ); |
442 | | } |
443 | | processedFlag = true; |
444 | | break; |
445 | | } |
446 | | } |
| 439 | var groupObj = element.getCustomData( 'list_group_object' ); |
| 440 | if ( groupObj ) |
| 441 | groupObj.contents.push( block ); |
| 442 | else |
| 443 | { |
| 444 | groupObj = { root : element, contents : [ block ] }; |
| 445 | listGroups.push( groupObj ); |
| 446 | CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj ); |
| 447 | } |
| 448 | processedFlag = true; |
| 449 | break; |
| 450 | } |
| 451 | } |
| 452 | } |