Skip to content
Discussion options

You must be logged in to vote

Hey @Aichnerc there's actually a fairly simple fix for that—use @payloadcms/richtext-lexical/react instead. The /react subpath export gives you only what you need for rendering.

The reason you're seeing errors is when you try to use @payloadcms/richtext-lexical directly you're pulling in editor code (including browser-only APIs) which breaks in static gen

export default function MyComponent({ content }) {
  return <RichText data={content} />
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zubricks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants