feat(editor): add page break node (#2202)

This commit is contained in:
Philip Okugbe
2026-05-14 03:48:13 +01:00
committed by GitHub
parent 3b983a27f6
commit f4af4c3fc0
10 changed files with 135 additions and 0 deletions
@@ -10,6 +10,7 @@ import {
IconH2,
IconH3,
IconMenu4,
IconPageBreak,
IconTypography,
} from "@tabler/icons-react";
import { useTranslation } from "react-i18next";
@@ -102,6 +103,12 @@ export const BlockTypeGroup: FC<Props> = ({ editor }) => {
>
{t("Divider")}
</Menu.Item>
<Menu.Item
leftSection={<IconPageBreak size={16} />}
onClick={() => editor.chain().focus().setPageBreak().run()}
>
{t("Page break")}
</Menu.Item>
</Menu.Dropdown>
</Menu>
);