diff --git a/ts/editor/index.ts b/ts/editor/index.ts index c0f39cb80..09e9e0a7d 100644 --- a/ts/editor/index.ts +++ b/ts/editor/index.ts @@ -8,6 +8,9 @@ import { filterHTML } from "html-filter"; import { updateActiveButtons } from "./toolbar"; import { setupI18n, ModuleName } from "lib/i18n"; +import { isApplePlatform } from "lib/platform"; +import { registerShortcut } from "lib/shortcuts"; +import { bridgeCommand } from "lib/bridgecommand"; import "./fields.css"; @@ -41,6 +44,10 @@ customElements.define("anki-editing-area", EditingArea, { extends: "div" }); customElements.define("anki-label-container", LabelContainer, { extends: "div" }); customElements.define("anki-editor-field", EditorField, { extends: "div" }); +if (isApplePlatform()) { + registerShortcut(() => bridgeCommand("paste"), "Control+Shift+V"); +} + export function getCurrentField(): EditingArea | null { return document.activeElement instanceof EditingArea ? document.activeElement