Files
margin/src/editor/extensions.ts
T
2026-06-27 09:32:22 -04:00

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,
];