A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
common: fix insert paragraph keybinding Signed-off-by: 01zulfi <[email protected]>
01zulfi534b8c5ad019
diff --git a/packages/common/src/utils/keybindings.ts b/packages/common/src/utils/keybindings.tsindex 9972a94f1..d59ca5fca 100644--- a/packages/common/src/utils/keybindings.ts+++ b/packages/common/src/utils/keybindings.ts@@ -222,7 +222,7 @@ export const tiptapKeys = {type: "tiptap"},insertParagraph: {- keys: "Mod-Shift-0",+ keys: "Mod-Alt-0",description: "Insert paragraph",category: "Editor",type: "tiptap"diff --git a/packages/editor/src/toolbar/tools/headings.tsx b/packages/editor/src/toolbar/tools/headings.tsxindex 5b321194c..14e953658 100644--- a/packages/editor/src/toolbar/tools/headings.tsx+++ b/packages/editor/src/toolbar/tools/headings.tsx@@ -28,6 +28,7 @@ import {import { useMemo } from "react";import { CodeBlock } from "../../extensions/code-block/index.js";import { strings } from "@notesnook/intl";+import { keybindings } from "@notesnook/common";const defaultLevels = [1, 2, 3, 4, 5, 6] as const;@@ -70,7 +71,7 @@ function toMenuItems(key: `heading-${level}`,title: toolbarLocation === "bottom" ? `H${level}` : strings.heading(level),isChecked: level === currentHeadingLevel,- modifier: `Mod-Alt-${level}`,+ modifier: keybindings[`insertHeading${level}`].keys,onClick: () =>editor?.chain()@@ -84,7 +85,7 @@ function toMenuItems(type: "button",title: strings.paragraph(),isChecked: !currentHeadingLevel,- modifier: `Mod-Alt-0`,+ modifier: keybindings.insertParagraph.keys,onClick: () => editor.chain().focus().setParagraph().run()};return [paragraph, ...menuItems];