Skip to main content
io.display.html() shows HTML markup in a page or in a step of an action, e.g. a preview of an email. Scripts, event handlers and other active content are removed before it is shown. It only displays and returns nothing. Provided by the @awaitio/display-html package.
An Email preview heading with a greeting, a line with the store name and date in bold and a blue Choose a plan link

Install

Setup

Register it under the key you want in io, see Display components:
app.ts

Usage

The label is the heading above the markup; pass null for none.

Props

Sanitizing

The markup can carry data from users, so it goes through DOMPurify in the browser right before it is shown: <script>, on… attributes such as onerror, javascript: links and similar are removed, and what stays gets the same text styles as io.display.markdown. For text you write yourself, markdown is usually simpler.