|
|
@@ -53,7 +53,17 @@ export default class TableClipboard extends Plugin {
|
|
|
|
|
|
this.listenTo( viewDocument, 'copy', ( evt, data ) => this._onCopyCut( evt, data ) );
|
|
|
this.listenTo( viewDocument, 'cut', ( evt, data ) => this._onCopyCut( evt, data ) );
|
|
|
- this.listenTo( viewDocument, 'clipboardOutput', ( evt, data ) => this._onClipboardOutput( evt, data ) );
|
|
|
+
|
|
|
+ // TODO: move to table selection plugin as it looks like a general problem solver.
|
|
|
+
|
|
|
+ this.listenTo( editor.model, 'deleteContent', ( evt, args ) => {
|
|
|
+ const [ selection ] = args;
|
|
|
+ if ( this._tableSelection.hasMultiCellSelection && selection.is( 'documentSelection' ) ) {
|
|
|
+ evt.stop();
|
|
|
+
|
|
|
+ clearTableCellsContents( this.editor.model, this._tableSelection.getSelectedTableCells() );
|
|
|
+ }
|
|
|
+ }, { priority: 'high' } );
|
|
|
}
|
|
|
|
|
|
/**
|