chore: upgrade keyboard shortcuts and context menus to use non-deprecated APIs (#7352)

* chore: remove references to clipboard.copy in shortcuts

* chore: remove references to clipboard.copy in context menus

* chore: fix tests

* chore: format

* fix: PR comments
This commit is contained in:
Beka Westberg
2023-08-11 09:38:50 -07:00
committed by GitHub
parent a901c62d0c
commit e30c4acd92
6 changed files with 38 additions and 27 deletions

View File

@@ -331,9 +331,10 @@ export function registerDuplicate() {
return 'hidden';
},
callback(scope: Scope) {
if (scope.block) {
clipboard.duplicate(scope.block);
}
if (!scope.block) return;
const data = scope.block.toCopyData();
if (!data) return;
clipboard.paste(data, scope.block.workspace);
},
scopeType: ContextMenuRegistry.ScopeType.BLOCK,
id: 'blockDuplicate',