From b954a3135dc1e4c8afaa0d239fe8a89e7e66d27f Mon Sep 17 00:00:00 2001 From: PJ Date: Mon, 10 Aug 2026 18:44:46 +0530 Subject: [PATCH] Straight through shortcut --- src/editor/extensions.ts | 2 ++ src/editor/shortcuts.ts | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/editor/shortcuts.ts diff --git a/src/editor/extensions.ts b/src/editor/extensions.ts index 5968a8a..4aca958 100644 --- a/src/editor/extensions.ts +++ b/src/editor/extensions.ts @@ -7,6 +7,7 @@ import { TextAlign } from "./align"; import { SearchHighlight } from "./search"; import { Proofing } from "./proofing"; import { Paste } from "./paste"; +import { Shortcuts } from "./shortcuts"; export const editorExtensions: Extensions = [ StarterKit.configure({ @@ -23,4 +24,5 @@ export const editorExtensions: Extensions = [ SearchHighlight, Proofing, Paste, + Shortcuts, ]; diff --git a/src/editor/shortcuts.ts b/src/editor/shortcuts.ts new file mode 100644 index 0000000..0774095 --- /dev/null +++ b/src/editor/shortcuts.ts @@ -0,0 +1,11 @@ +import { Extension } from "@tiptap/core"; + +export const Shortcuts = Extension.create({ + name: "shortcuts", + + addKeyboardShortcuts() { + return { + "Mod-Shift-x": () => this.editor.commands.toggleStrike(), + }; + }, +});