Ticket #6649: 6649.patch
File 6649.patch, 1.0 KB (added by , 13 years ago) |
---|
-
_source/plugins/tabletools/plugin.js
721 721 if ( !table ) 722 722 return; 723 723 724 // Maintain the selection point at where the table was deleted.725 selection.selectElement( table );726 var range = selection.getRanges()[0];727 range.collapse();728 selection.selectRanges( [ range ] );729 730 724 // If the table's parent has only one child remove it as well (unless it's the body or a table cell) (#5416, #6289) 731 725 var parent = table.getParent(); 732 726 if ( parent.getChildCount() == 1 && !parent.is( 'body', 'td', 'th' ) ) 733 parent.remove(); 734 else 735 table.remove(); 727 table = parent; 728 729 var range = new CKEDITOR.dom.range( editor.document ); 730 range.moveToPosition( table, CKEDITOR.POSITION_BEFORE_START ); 731 table.remove(); 732 range.select(); 736 733 } 737 734 } ); 738 735