HTMLBlock | R Documentation |
HTMLBlock
Specialized FileBlock
for managing HTML content in reports.
It's designed to handle various HTML content, and render the report as HTML,
however htmlwidgets
objects can also be rendered to static document-ready format.
teal.reporter::ContentBlock
-> HTMLBlock
new()
Initialize a HTMLBlock
object.
HTMLBlock$new(content)
content
An object that can be rendered as a HTML content assigned to
this HTMLBlock
Object of class HTMLBlock
, invisibly.
from_list()
Create the HTMLBlock
from a list.
HTMLBlock$from_list(x)
x
(named list
) with a single field content
containing shiny.tag
,
shiny.tag.list
or htmlwidget
.
self
, invisibly.
HTMLBlock <- getFromNamespace("HTMLBlock", "teal.reporter") block <- HTMLBlock$new() block$from_list(list(content = shiny::tags$div("test")))
to_list()
Convert the HTMLBlock
to a list.
HTMLBlock$to_list()
named list
with a text and style.
HTMLBlock <- getFromNamespace("HTMLBlock", "teal.reporter") block <- HTMLBlock$new(shiny::tags$div("test")) block$to_list()
clone()
The objects of this class are cloneable with this method.
HTMLBlock$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `HTMLBlock$from_list`
## ------------------------------------------------
HTMLBlock <- getFromNamespace("HTMLBlock", "teal.reporter")
block <- HTMLBlock$new()
block$from_list(list(content = shiny::tags$div("test")))
## ------------------------------------------------
## Method `HTMLBlock$to_list`
## ------------------------------------------------
HTMLBlock <- getFromNamespace("HTMLBlock", "teal.reporter")
block <- HTMLBlock$new(shiny::tags$div("test"))
block$to_list()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.