[RTE Phase 1] Rich text editor updates in Metafield
Epic: #374898
Renders react components in hydrogen when passed to the Metafield component. This will require recursively traversing the AST, and performantly rendering React components according to the AST.
How does the serializer support current and new plugins?
From the first take, we would have to support updating the serializer for every new plugin.
Link to demo: https://screenshot.click/01-13-f2vi9-ho4dn.mp4
Having discussions around AST and the GraphQL API.
- Sanity call as an action item with Kusum.
- Slack coordination as an action item.
Exciting to see rich text support getting worked on! Just wanted to call out that we've had really great experiences with the Contentful rich text schema. Specifically, one of the most useful features is the ability to inject either inline or block entity references. That has enabled us to e.g. personalize marketing copy using a customer's name or render an interactive React component within the copy.
I have a lot of first-hand experience working with Contentful rich text, happy to provide more context if that helps!
hey @TirmanSidhu @joe-szczepaniak - Can you please provide more context on this? Are there any specific requirements you need from the Hydrogen Metafield component?
Hi @elisenyang, we are just sorting out the AST structure we plan to use for storing the metafield value, but also considering return serialized HTML to consumers for the initial release, since this might get us more adoption from developers. I'll reach out as soon as we are settled on something!