# Inline HTML message.
envelope() %>% html("Hello!")
# Read HTML message from a file.
htmlfile <- tempfile(fileext = ".html")
cat("Hello!\n", file = htmlfile)
envelope() %>% html(htmlfile)
# You can pass a vector of character. Components will be separated by a
# "\n".
envelope() %>% html(c("Hello", "World!"))
# You can also pass a tagList from {htmltools}.
if (requireNamespace("htmltools", quietly = TRUE)) {
library(htmltools)
envelope() %>% html(tagList(h2("Hello"), p("World!")))
}
Run the code above in your browser using DataLab