mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
feat(editor): add figure block with placement and caption
This commit is contained in:
1 parent
e76558fe1f
commit
50bde45d65
3 files changed
+78
-1
No files matched your search
@@ -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,
|
||||
];
|
||||
Reference in new issue
Block a user