Skip to content

io.display.html ​

Represents a display.html component.

Only supports presentational tags without custom script or styling. Any unsupported tags or attributes will be stripped.

TIP

If you don't have HTML already, we recommend using io.display.markdown for more readable and maintainable code.

Usage ​

ts
await io.display.html("Message body", {
  html: "<p>Hello, world!</p>",
})
python
await io.display.html(
    "Message body",
    html="<p>Hello, world!</p>",
)

example of Forge app with display.html component

Props ​

html Required ​

string
The HTML content to display.

Returns null ​

Supported tags ​

The following HTML tags are currently supported:

  • a
  • abbr
  • address
  • b
  • bdi
  • bdo
  • blockquote
  • br
  • caption
  • cite
  • code
  • data
  • dfn
  • div
  • em
  • h1
  • h2
  • h3
  • h4
  • h5
  • h6
  • hr
  • i
  • img
  • kbd
  • li
  • mark
  • nav
  • ol
  • p
  • picture
  • pre
  • q
  • rb
  • rp
  • rt
  • rtc
  • ruby
  • s
  • samp
  • small
  • span
  • strong
  • time
  • u
  • ul
  • var
  • video
  • wbr

Unsupported tags will be stripped from display, though their text content should remain.