fix(editor): table block readonly support (#10224)

close: BS-2597
This commit is contained in:
zzj3720
2025-02-17 10:19:00 +00:00
parent 29d8824479
commit e4f2223a2a
4 changed files with 32 additions and 18 deletions
@@ -29,6 +29,9 @@ export class SelectionController implements ReactiveController {
this.host.addController(this);
}
hostConnected() {
if (this.dataManager.readonly$.value) {
return;
}
this.dragListener();
this.host.handleEvent('copy', this.onCopy);
this.host.handleEvent('cut', this.onCut);
@@ -340,7 +343,6 @@ export class SelectionController implements ReactiveController {
};
onCopy = () => {
const selection = this.getSelected();
console.log('selection', selection);
if (!selection || selection.type !== 'area') {
return false;
}