TextBlock
TextBlock
Super class
teal.reporter::ContentBlock -> TextBlock
Methods
Method new()
Returns a TextBlock object.
Arguments
content(
character(1)orcharacter(0)) a string assigned to thisTextBlockstyle(
character(1)) one of:"default","header2","header3""verbatim"
Examples
block <- teal.reporter:::TextBlock$new()
Method set_style()
Sets the style of this TextBlock.
Examples
block <- teal.reporter:::TextBlock$new()
block$set_style("header2")
Method get_style()
Returns the style of this TextBlock.
Examples
block <- teal.reporter:::TextBlock$new()
block$get_style()
Method get_available_styles()
Returns an array of styles available to this TextBlock.
Examples
block <- teal.reporter:::TextBlock$new()
block$get_available_styles()
Method from_list()
Create the TextBlock from a list.
Method to_list()
Convert the TextBlock to a list.
Examples
block <- teal.reporter:::TextBlock$new()
block$to_list()Examples
## ------------------------------------------------
## Method `TextBlock$new`
## ------------------------------------------------
block <- teal.reporter:::TextBlock$new()
## ------------------------------------------------
## Method `TextBlock$set_style`
## ------------------------------------------------
block <- teal.reporter:::TextBlock$new()
block$set_style("header2")
## ------------------------------------------------
## Method `TextBlock$get_style`
## ------------------------------------------------
block <- teal.reporter:::TextBlock$new()
block$get_style()
#> [1] "default"
## ------------------------------------------------
## Method `TextBlock$get_available_styles`
## ------------------------------------------------
block <- teal.reporter:::TextBlock$new()
block$get_available_styles()
#> [1] "default" "header2" "header3" "verbatim"
## ------------------------------------------------
## Method `TextBlock$from_list`
## ------------------------------------------------
block <- teal.reporter:::TextBlock$new()
block$from_list(list(text = "sth", style = "default"))
## ------------------------------------------------
## Method `TextBlock$to_list`
## ------------------------------------------------
block <- teal.reporter:::TextBlock$new()
block$to_list()
#> $text
#> character(0)
#>
#> $style
#> [1] "default"
#>