ContentBlock | R Documentation |
ContentBlock
: A building block for report contentThis class represents a basic content unit in a report, such as text, images, or other multimedia elements. It serves as a foundation for constructing complex report structures.
set_content()
Sets content of this ContentBlock
.
ContentBlock$set_content(content)
content
(any
) R object
self
, invisibly.
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter") block <- ContentBlock$new() block$set_content("Base64 encoded picture")
get_content()
Retrieves the content assigned to this block.
ContentBlock$get_content()
object stored in a private$content
field
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter") block <- ContentBlock$new() block$get_content()
from_list()
Create the ContentBlock
from a list.
ContentBlock$from_list(x)
x
(named list
) with two fields text
and style
.
Use the get_available_styles
method to get all possible styles.
self
, invisibly.
to_list()
Convert the ContentBlock
to a list.
ContentBlock$to_list()
named list
with a text and style.
clone()
The objects of this class are cloneable with this method.
ContentBlock$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `ContentBlock$set_content`
## ------------------------------------------------
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
block <- ContentBlock$new()
block$set_content("Base64 encoded picture")
## ------------------------------------------------
## Method `ContentBlock$get_content`
## ------------------------------------------------
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
block <- ContentBlock$new()
block$get_content()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.