Convert HTML to Prismic's rich text JSON format?

Is there any way to convert HTML to Prismic's rich text JSON format? If you're writing a Storybook component that is going to accept Prismic's rich text JSON as one of the props it's a convoluted process to write stories with the right args – it would be a lot easier to write the HTML.

Thanks

Alistair

Also curious to know if the JSON uses some kind of standard or is something completely bespoke to Prismic?

Hey @alistairholt1,

There's a 3rd party tool for converting back and forth between Rich Text and HTML.

I assume you're not working with Slice Machine as it does this work by generating the Storybook Stories for you.

I'm checking to see if JSON is based on a library or not.

Thanks.

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.