Replies: 2 comments 1 reply
-
You will need to pass converters for your blocks to the |
Beta Was this translation helpful? Give feedback.
-
Bumping this up, as I'm running into the same problem. This is defined in my blog collection, for example.
I need to use expect error because defaultConverters doesn't match the types provided for this implementation. The content field contains a richText editor that has a block with content and an image. The content renders no problem, but the media comes back as an ID. It's not a depth issue, as changing default depth does not fix the issue. As far as I can tell, there also isn't a prop available that will allow me to fetch the image myself. Also, this converter function works when provided in the first example in the docs: https://payloadcms.com/docs/rich-text/converting-html#converting-lexical-blocks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug
I have been using Media Block in the
BlocksFeature
of the RichText. Actually I'm managing 2 fields for richtext, one is the normal richtext field and other is hidden with code type where I put abeforeValidate
hook to convert richText content to equivalent HTML usingconvertLexicalToHTML
converter.It is working fine without Media Block, but unable to handle Media Block and getting this on conversion
<div class=\"payload-richtext\"><p><br /></p><span>unknown node</span></div>
Link to the code that reproduces this issue
npx create-payload-app@latest -t website
Reproduction Steps
Which area(s) are affected? (Select all that apply)
plugin: richtext-lexical
Environment Info
Beta Was this translation helpful? Give feedback.
All reactions