| span | R Documentation |
span() creates a piece of text with its own style. Spans can be
combined with c() and returned from a widget's render function or
passed to label(). Newlines start new lines.
span(x = "", style = NULL, link = NULL)
## S3 method for class 'termr_text'
c(...)
x |
Text. A character vector is joined with newlines. May also be spans, to nest styles. |
style |
A |
link |
Optional link target (a URL or any string). Stored as metadata on the text for widgets that support it; not rendered yet. |
... |
Spans or character strings to combine. |
Spans nest: span(c(span("a"), span("b", s1)), s2) applies s2 to both
pieces, with the inner style taking precedence.
An object of class termr_text.
c(span("Status: "), span("OK", style(foreground = "green", bold = TRUE)))
span(c(span("bold "), span("and red", style(foreground = "red"))), style(bold = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.