Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: headings 4, 5 and 6 triggering heading 3 (#5206)

Aaryan Khandelwalc6cdc12165b1
diff --git a/packages/editor/src/core/extensions/slash-commands.tsx b/packages/editor/src/core/extensions/slash-commands.tsx
index b58becc163..a84ff5d162 100644
--- a/packages/editor/src/core/extensions/slash-commands.tsx
+++ b/packages/editor/src/core/extensions/slash-commands.tsx
@@ -32,6 +32,9 @@ import {
toggleHeadingOne,
toggleHeadingTwo,
toggleHeadingThree,
+ toggleHeadingFour,
+ toggleHeadingFive,
+ toggleHeadingSix,
} from "@/helpers/editor-commands";
// types
import { CommandProps, ISlashCommandItem, UploadImage } from "@/types";
@@ -139,7 +142,7 @@ const getSuggestionItems =
searchTerms: ["subtitle", "small"],
icon: <Heading4 className="size-3.5" />,
command: ({ editor, range }: CommandProps) => {
- toggleHeadingThree(editor, range);
+ toggleHeadingFour(editor, range);
},
},
{
@@ -149,7 +152,7 @@ const getSuggestionItems =
searchTerms: ["subtitle", "small"],
icon: <Heading5 className="size-3.5" />,
command: ({ editor, range }: CommandProps) => {
- toggleHeadingThree(editor, range);
+ toggleHeadingFive(editor, range);
},
},
{
@@ -159,7 +162,7 @@ const getSuggestionItems =
searchTerms: ["subtitle", "small"],
icon: <Heading6 className="size-3.5" />,
command: ({ editor, range }: CommandProps) => {
- toggleHeadingThree(editor, range);
+ toggleHeadingSix(editor, range);
},
},
{