render_html: Render a styled HTML fragment

View source: R/export.R

render_htmlR Documentation

Render a styled HTML fragment

Description

Render a styled HTML fragment

Usage

render_html(x, width = 80, height = 24, color = TRUE, trim = TRUE)

Arguments

x

A widget, Screen, App, or ScreenBuffer.

width, height

Frame size in cells.

color

Include framebuffer colours even when NO_COLOR is set?

trim

Remove trailing spaces from each line?

Value

An embeddable ⁠<pre>⁠ fragment. Styling is approximate and depends on the browser's monospace font and CSS environment.

Examples

cat(render_html(label("Ready", style = style(foreground = "green", bold = TRUE))))

termr documentation built on Oct. 21, 2026, 5:13 p.m.