RichText -> Portable Text

default discord avatar
hades200082
2 months ago
1

Is there anything in Payload API or in what we receive from the API that can convert a richText field to "Portable Text" so something like

https://github.com/portabletext/react-portabletext

could be used for rendering?

  • default discord avatar
    notchr
    2 months ago

    Good morning @hades200082 - thanks for the question. Payload uses "Slate" as its rich text editor currentlly (others have been proposed). I personally do not know much about portabletext, but I did find a fiddle that may be relevant?



    Slate + Portabletext demo (Codesandbox) -

    https://codesandbox.io/s/portable-text-on-slate-proof-of-concept-l6xmo

    Let us know if you figure out anything cool!

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.