HTMLBlock {teal.reporter} | R Documentation |
HTMLBlock
Description
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.
Super class
teal.reporter::ContentBlock
-> HTMLBlock
Methods
Public methods
Inherited methods
Method new()
Initialize a HTMLBlock
object.
Usage
HTMLBlock$new(content)
Arguments
content
An object that can be rendered as a HTML content assigned to this
HTMLBlock
Returns
Object of class HTMLBlock
, invisibly.
Method from_list()
Create the HTMLBlock
from a list.
Usage
HTMLBlock$from_list(x)
Arguments
x
(
named list
) with a single fieldcontent
containingshiny.tag
,shiny.tag.list
orhtmlwidget
.
Returns
self
, invisibly.
Examples
HTMLBlock <- getFromNamespace("HTMLBlock", "teal.reporter") block <- HTMLBlock$new() block$from_list(list(content = shiny::tags$div("test")))
Method to_list()
Convert the HTMLBlock
to a list.
Usage
HTMLBlock$to_list()
Returns
named list
with a text and style.
Examples
HTMLBlock <- getFromNamespace("HTMLBlock", "teal.reporter") block <- HTMLBlock$new(shiny::tags$div("test")) block$to_list()
Method clone()
The objects of this class are cloneable with this method.
Usage
HTMLBlock$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
## ------------------------------------------------
## 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()
[Package teal.reporter version 0.4.0 Index]