Skip to content

iframe element

Sandboxed iframe embedding a self-contained HTML document.

Fields

Field Type Default Description
iframe_html string required Full HTML document inlined as the iframe's srcdoc attribute. Authored inline or via iframe_html_file: "path/to/page.html" (the file form reads the file at parse time). Must be self-contained — relative references inside the document do not resolve under about:srcdoc.
iframe_html_file path (optional) null Path to a file whose text becomes iframe_html, relative to the slide source file (e.g. "page.html"). Read and inlined at parse time. Author exactly one of iframe_html / iframe_html_file; validated slides always carry iframe_html.
border_width integer 0 Border width in CSS pixels around the iframe wrapper. 0 (default) = no border. When non-zero, the wrapper uses box-sizing: border-box so the declared width / height are the outer footprint including the border.
border_color string "#000000" CSS color of the border. Only rendered when border_width > 0.
shadow_size integer 0 Soft-glow shadow size in CSS pixels — interpreted as the box-shadow blur radius with zero offset and zero spread. 0 (default) = no shadow.
shadow_color string "#000000" CSS color of the shadow. Only rendered when shadow_size > 0.

Every element also shares the common fields — position, size, anchor, opacity, scale, and angle.

Example

{
  // Sandboxed embed of a self-contained HTML document, with a thin border.
  iframe_html: "<!doctype html><html><body><h1>Embedded</h1></body></html>",
  position: [10, 10],
  width: 80,
  height: 60,
  border_width: 1,
}