| 759 | 'div' : function( element ) |
| 760 | { |
| 761 | // Aligned table with no text surrounded is represented by a wrapper div, from which |
| 762 | // table cells inherit as text-align styles, which is wrong. |
| 763 | // Instead we use a clear-float div after the table to properly achieve the same layout. |
| 764 | var singleChild = element.onlyChild(); |
| 765 | if( singleChild && singleChild.name == 'table' ) |
| 766 | { |
| 767 | var attrs = element.attributes; |
| 768 | singleChild.attributes = CKEDITOR.tools.extend( singleChild.attributes, attrs ); |
| 769 | attrs.style && singleChild.addStyle( attrs.style ); |
| 770 | |
| 771 | var clearFloatDiv = new CKEDITOR.htmlParser.element( 'div' ); |
| 772 | clearFloatDiv.addStyle( 'clear' ,'both' ); |
| 773 | element.add( clearFloatDiv ); |
| 774 | delete element.name; |
| 775 | } |
| 776 | }, |
| 777 | |