feat(profile): add code, mark, and horizontal rule nodes to dossier editors
Register CodeNode/CodeHighlightNode, MarkNode, and HorizontalRuleNode in the DossierExcerptEditors Lexical config so excerpts can use code blocks with highlighting, inline marks, and divider rules. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
db02be7ce9
commit
56b8b9d320
1 changed files with 7 additions and 0 deletions
|
|
@ -15,6 +15,9 @@ import { RichTextPlugin } from "@payloadcms/richtext-lexical/lexical/react/Lexic
|
||||||
import { HeadingNode, QuoteNode } from "@payloadcms/richtext-lexical/lexical/rich-text";
|
import { HeadingNode, QuoteNode } from "@payloadcms/richtext-lexical/lexical/rich-text";
|
||||||
import { ListItemNode, ListNode } from "@payloadcms/richtext-lexical/lexical/list";
|
import { ListItemNode, ListNode } from "@payloadcms/richtext-lexical/lexical/list";
|
||||||
import { AutoLinkNode, LinkNode } from "@payloadcms/richtext-lexical/lexical/link";
|
import { AutoLinkNode, LinkNode } from "@payloadcms/richtext-lexical/lexical/link";
|
||||||
|
import { MarkNode } from "@payloadcms/richtext-lexical/lexical/mark";
|
||||||
|
import { CodeHighlightNode, CodeNode } from "@lexical/code";
|
||||||
|
import { HorizontalRuleNode } from "@payloadcms/richtext-lexical/lexical/react/LexicalHorizontalRuleNode";
|
||||||
import { $getRoot } from "@payloadcms/richtext-lexical/lexical";
|
import { $getRoot } from "@payloadcms/richtext-lexical/lexical";
|
||||||
import type { LexicalEditor } from "@payloadcms/richtext-lexical/lexical";
|
import type { LexicalEditor } from "@payloadcms/richtext-lexical/lexical";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
|
@ -38,6 +41,10 @@ const EDITOR_NODES = [
|
||||||
ListItemNode,
|
ListItemNode,
|
||||||
LinkNode,
|
LinkNode,
|
||||||
AutoLinkNode,
|
AutoLinkNode,
|
||||||
|
HorizontalRuleNode,
|
||||||
|
CodeNode,
|
||||||
|
CodeHighlightNode,
|
||||||
|
MarkNode,
|
||||||
];
|
];
|
||||||
|
|
||||||
const EDITOR_CONTENT_CLASSES =
|
const EDITOR_CONTENT_CLASSES =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue