Straight through shortcut

This commit is contained in:
pj committed 2026-08-10 18:44:46 +05:30
1 parent 9e310a34bb
commit b954a3135d
2 files changed
+13

No files matched your search

+2
View File
@@ -7,6 +7,7 @@ import { TextAlign } from "./align";
import { SearchHighlight } from "./search"; import { SearchHighlight } from "./search";
import { Proofing } from "./proofing"; import { Proofing } from "./proofing";
import { Paste } from "./paste"; import { Paste } from "./paste";
import { Shortcuts } from "./shortcuts";
export const editorExtensions: Extensions = [ export const editorExtensions: Extensions = [
StarterKit.configure({ StarterKit.configure({
@@ -23,4 +24,5 @@ export const editorExtensions: Extensions = [
SearchHighlight, SearchHighlight,
Proofing, Proofing,
Paste, Paste,
Shortcuts,
]; ];
+11
View File
@@ -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(),
};
},
});