1
0
Fork 0

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:
Jason Fraley 2026-09-06 05:36:55 -04:00
parent db02be7ce9
commit 56b8b9d320

View file

@ -15,6 +15,9 @@ import { RichTextPlugin } from "@payloadcms/richtext-lexical/lexical/react/Lexic
import { HeadingNode, QuoteNode } from "@payloadcms/richtext-lexical/lexical/rich-text";
import { ListItemNode, ListNode } from "@payloadcms/richtext-lexical/lexical/list";
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 type { LexicalEditor } from "@payloadcms/richtext-lexical/lexical";
import { Button } from "@/components/ui/button";
@ -38,6 +41,10 @@ const EDITOR_NODES = [
ListItemNode,
LinkNode,
AutoLinkNode,
HorizontalRuleNode,
CodeNode,
CodeHighlightNode,
MarkNode,
];
const EDITOR_CONTENT_CLASSES =