mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
27 lines
803 B
TypeScript
27 lines
803 B
TypeScript
import type { Extensions } from "@tiptap/core";
|
|
import StarterKit from "@tiptap/starter-kit";
|
|
import Placeholder from "@tiptap/extension-placeholder";
|
|
import { Figure } from "./figure";
|
|
import { ParagraphIndent } from "./indent";
|
|
import { TextAlign } from "./align";
|
|
import { SearchHighlight } from "./search";
|
|
import { Proofing } from "./proofing";
|
|
import { Paste } from "./paste";
|
|
|
|
export const editorExtensions: Extensions = [
|
|
StarterKit.configure({
|
|
heading: { levels: [2, 3] },
|
|
codeBlock: false,
|
|
link: { openOnClick: false, autolink: true, defaultProtocol: "https" },
|
|
}),
|
|
Placeholder.configure({
|
|
placeholder: ({ node }) => (node.type.name === "heading" ? "" : "Begin your chapter…"),
|
|
}),
|
|
Figure,
|
|
ParagraphIndent,
|
|
TextAlign,
|
|
SearchHighlight,
|
|
Proofing,
|
|
Paste,
|
|
];
|