1 import {HeadingNode, QuoteNode} from '@lexical/rich-text';
2 import {CalloutNode} from './callout';
3 import {ElementNode, KlassConstructor, LexicalNode, LexicalNodeReplacement, ParagraphNode} from "lexical";
4 import {CustomParagraphNode} from "./custom-paragraph";
5 import {LinkNode} from "@lexical/link";
6 import {ImageNode} from "./image";
9 * Load the nodes for lexical.
11 export function getNodesForPageEditor(): (KlassConstructor<typeof LexicalNode> | LexicalNodeReplacement)[] {
13 CalloutNode, // Todo - Create custom
14 HeadingNode, // Todo - Create custom
15 QuoteNode, // Todo - Create custom
19 replace: ParagraphNode,
20 with: (node: ParagraphNode) => {
21 return new CustomParagraphNode();
28 export type LexicalNodeMatcher = (node: LexicalNode|null|undefined) => boolean;
29 export type LexicalElementNodeCreator = () => ElementNode;