feat: add hotkeys (#986)

This commit is contained in:
Meier Lukas
2024-08-18 12:07:00 +02:00
committed by GitHub
parent 3eb90968ac
commit 7521ef0519
3 changed files with 7 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ import {
useMantineColorScheme,
useMantineTheme,
} from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import { getHotkeyHandler, useDisclosure } from "@mantine/hooks";
import { Link, RichTextEditor, useRichTextEditorContext } from "@mantine/tiptap";
import {
IconCheck,
@@ -231,6 +231,7 @@ export function Notebook({ options, isEditMode, boardId, itemId }: WidgetCompone
p={0}
mt={0}
h="100%"
onKeyDown={isEditing ? getHotkeyHandler([["mod+s", handleEditToggle]]) : undefined}
editor={editor}
styles={(theme) => ({
root: {