import { RichText as LexicalRichText, type JSXConvertersFunction, } from "@payloadcms/richtext-lexical/react"; import type { DefaultNodeTypes } from "@payloadcms/richtext-lexical"; const converters: JSXConvertersFunction = ({ defaultConverters }) => ({ ...defaultConverters, paragraph: ({ node, nodesToJSX }) => { const children = nodesToJSX({ nodes: node.children }); if (!children?.length) return null; return

{children}

; }, heading: ({ node, nodesToJSX }) => { const children = nodesToJSX({ nodes: node.children }); const Tag = node.tag; return ( {children} ); }, }); type RichTextProps = { data: NonNullable[0]["data"]>; className?: string; }; /** Renders a Payload Lexical richText field with the ANOUMA reading styles. */ export function RichText({ data, className = "space-y-6" }: RichTextProps) { return ; }