Packages narrative
packages / shopify-html
shopify-html
Functions
| Name | Description |
|---|---|
toPlainText | Converts a Shopify-origin HTML string to plain text, inserting newlines at block-element boundaries to preserve paragraph structure. |
toReactNodes | Parses a Shopify-origin HTML string and returns a React node tree suitable for direct rendering, normalizing HTML attributes and optionally replacing tags with custom React components. |
Types
| Name | Description |
|---|---|
ToReactNodesOptions | Options accepted by |
VariablesOf
Typed variables shape required to execute a given graphql() document. Use it to type the variables object passed to Apollo's useQuery or client.query so argumen
toPlainText
Converts a Shopifyorigin HTML string to plain text, inserting newlines at blockelement boundaries to preserve paragraph structure.