io.display.html
Your own HTML, sanitized first.
io.display.html shows HTML markup in a page or in a step of an action. It is made for things like a preview of an email before it goes out. Scripts, event handlers and other active content are removed before it is shown. It only displays and returns nothing.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Preview email
What you can set
The settings you will reach for most, each with the line of code that turns it on.
The email as it goes out. Pass the HTML your email template renders. The person sees it before anyone gets it.
Active content removed. Scripts, event handlers such as onerror and javascript: links are removed. The markup can carry data from users.
Styled like markdown. What stays gets the same text styles as io.display.markdown. It looks like the rest of the app.
A heading or none. The label is the heading above the markup. Pass null to show the markup alone.
Next to a question. In io.group it sits next to inputs, such as the email right above the question whether to send it.
Markdown for your own text. HTML is for markup you already have. For text you write yourself, io.display.markdown is usually simpler.
More in the docs
This page shows the idea. The docs have every prop, the checks on the server and more examples.
Next components
Three more calls on io. Each one shows a control and hands your code a typed value.
Write your first tool today.
An async function, a few await calls, and the form is in the browser.