mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 11:07:04 +00:00
Straight through shortcut
This commit is contained in:
1 parent
9e310a34bb
commit
b954a3135d
2 files changed
+13
No files matched your search
@@ -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,
|
||||
];
|
||||
@@ -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(),
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user