For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I have an admin extension on the order info screen. I am loading data from a 3rd party source and I would like to output this data to the page. Some of this data is html, however when I output it to the screen it shows the raw html. Is there a way to insert it as html instead of rending it as text?
It is probably React escaping strings with special characters.
Try using dangerouslySetInnerHtml: https://react.dev/reference/react-dom/components/common#dangerously-setting-the-inner-html
But make sure where you are getting your HTML from is a trusted source or it could be vulnerable to script injection.
Gojiberry - Best post-purchase survey and feedback app for Shopify | Install on App Store for free
Shopify Community is helpful, BUT... why not start asking your customers for feedback instead?