add H3 to editor formatting toolbar (#6791)

This commit is contained in:
Hemachandar
2024-04-12 06:23:05 +05:30
committed by GitHub
parent 2e427a1e83
commit 5974e5635a

View File

@@ -16,6 +16,7 @@ import {
OutdentIcon, OutdentIcon,
IndentIcon, IndentIcon,
CopyIcon, CopyIcon,
Heading3Icon,
} from "outline-icons"; } from "outline-icons";
import { EditorState } from "prosemirror-state"; import { EditorState } from "prosemirror-state";
import { isInTable } from "prosemirror-tables"; import { isInTable } from "prosemirror-tables";
@@ -107,6 +108,14 @@ export default function formattingMenuItems(
attrs: { level: 2 }, attrs: { level: 2 },
visible: allowBlocks && !isCode, visible: allowBlocks && !isCode,
}, },
{
name: "heading",
tooltip: dictionary.subheading,
icon: <Heading3Icon />,
active: isNodeActive(schema.nodes.heading, { level: 3 }),
attrs: { level: 3 },
visible: allowBlocks && !isCode,
},
{ {
name: "blockquote", name: "blockquote",
tooltip: dictionary.quote, tooltip: dictionary.quote,