ToReactNodesOptions
●shopify-html · /index·type
Options accepted by that let callers substitute custom React components for specific HTML tags during conversion.
Properties
PROPTYPEDESCRIPTION
components?
Partial<Record<keyof JSX.IntrinsicElements, ElementType>>
Override which component to render for a given tag.
Example
toReactNodes(html, {
components: { a: LinkComponent, img: ResponsiveImage },
});Related
toPlainText
Converts a Shopifyorigin HTML string to plain text, inserting newlines at blockelement boundaries to preserve paragraph structure.
toReactNodes
Parses a Shopifyorigin HTML string and returns a React node tree suitable for direct rendering, normalizing HTML attributes and optionally replacing tags with c