mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
Remove registerShortcut for Ctrl+C/V/A/X from editor/index.ts
This commit is contained in:
parent
355e66e83c
commit
61e38a8bc9
1 changed files with 0 additions and 7 deletions
|
@ -8,8 +8,6 @@
|
||||||
import { filterHTML } from "html-filter";
|
import { filterHTML } from "html-filter";
|
||||||
import { updateActiveButtons } from "./toolbar";
|
import { updateActiveButtons } from "./toolbar";
|
||||||
import { setupI18n, ModuleName } from "lib/i18n";
|
import { setupI18n, ModuleName } from "lib/i18n";
|
||||||
import { registerShortcut } from "lib/shortcuts";
|
|
||||||
import { bridgeCommand } from "./lib";
|
|
||||||
|
|
||||||
import "./fields.css";
|
import "./fields.css";
|
||||||
|
|
||||||
|
@ -43,11 +41,6 @@ customElements.define("anki-editing-area", EditingArea, { extends: "div" });
|
||||||
customElements.define("anki-label-container", LabelContainer, { extends: "div" });
|
customElements.define("anki-label-container", LabelContainer, { extends: "div" });
|
||||||
customElements.define("anki-editor-field", EditorField, { extends: "div" });
|
customElements.define("anki-editor-field", EditorField, { extends: "div" });
|
||||||
|
|
||||||
registerShortcut(() => document.execCommand("copy"), "Control+C");
|
|
||||||
registerShortcut(() => document.execCommand("cut"), "Control+X");
|
|
||||||
registerShortcut(() => document.execCommand("selectAll"), "Control+A");
|
|
||||||
registerShortcut(() => bridgeCommand("paste"), "Control+Shift+V");
|
|
||||||
|
|
||||||
export function getCurrentField(): EditingArea | null {
|
export function getCurrentField(): EditingArea | null {
|
||||||
return document.activeElement instanceof EditingArea
|
return document.activeElement instanceof EditingArea
|
||||||
? document.activeElement
|
? document.activeElement
|
||||||
|
|
Loading…
Reference in a new issue