feat(editor): add figure block with placement and caption

This commit is contained in:
pj committed 2026-06-20 12:46:18 -04:00
1 parent e76558fe1f
commit 50bde45d65
3 files changed
+78 -1

No files matched your search

+5 -1
View File
@@ -1,11 +1,15 @@
import type { Extensions } from "@tiptap/core";
import StarterKit from "@tiptap/starter-kit";
import Placeholder from "@tiptap/extension-placeholder";
import { Figure } from "./figure";
export const editorExtensions: Extensions = [
StarterKit.configure({
heading: { levels: [2, 3] },
codeBlock: false,
}),
Placeholder.configure({ placeholder: "Begin your chapter…" }),
Placeholder.configure({
placeholder: ({ node }) => (node.type.name === "heading" ? "" : "Begin your chapter…"),
}),
Figure,
];