fix: headings 4, 5 and 6 triggering heading 3 (#5206)
This commit is contained in:
parent
7b6a2343cb
commit
c6cdc12165
1 changed files with 6 additions and 3 deletions
|
|
@ -32,6 +32,9 @@ import {
|
||||||
toggleHeadingOne,
|
toggleHeadingOne,
|
||||||
toggleHeadingTwo,
|
toggleHeadingTwo,
|
||||||
toggleHeadingThree,
|
toggleHeadingThree,
|
||||||
|
toggleHeadingFour,
|
||||||
|
toggleHeadingFive,
|
||||||
|
toggleHeadingSix,
|
||||||
} from "@/helpers/editor-commands";
|
} from "@/helpers/editor-commands";
|
||||||
// types
|
// types
|
||||||
import { CommandProps, ISlashCommandItem, UploadImage } from "@/types";
|
import { CommandProps, ISlashCommandItem, UploadImage } from "@/types";
|
||||||
|
|
@ -139,7 +142,7 @@ const getSuggestionItems =
|
||||||
searchTerms: ["subtitle", "small"],
|
searchTerms: ["subtitle", "small"],
|
||||||
icon: <Heading4 className="size-3.5" />,
|
icon: <Heading4 className="size-3.5" />,
|
||||||
command: ({ editor, range }: CommandProps) => {
|
command: ({ editor, range }: CommandProps) => {
|
||||||
toggleHeadingThree(editor, range);
|
toggleHeadingFour(editor, range);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -149,7 +152,7 @@ const getSuggestionItems =
|
||||||
searchTerms: ["subtitle", "small"],
|
searchTerms: ["subtitle", "small"],
|
||||||
icon: <Heading5 className="size-3.5" />,
|
icon: <Heading5 className="size-3.5" />,
|
||||||
command: ({ editor, range }: CommandProps) => {
|
command: ({ editor, range }: CommandProps) => {
|
||||||
toggleHeadingThree(editor, range);
|
toggleHeadingFive(editor, range);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -159,7 +162,7 @@ const getSuggestionItems =
|
||||||
searchTerms: ["subtitle", "small"],
|
searchTerms: ["subtitle", "small"],
|
||||||
icon: <Heading6 className="size-3.5" />,
|
icon: <Heading6 className="size-3.5" />,
|
||||||
command: ({ editor, range }: CommandProps) => {
|
command: ({ editor, range }: CommandProps) => {
|
||||||
toggleHeadingThree(editor, range);
|
toggleHeadingSix(editor, range);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue