Set HTML formatter
Usage
set_formatter_html(widget, columns, hoz_align = c("left", "center", "right"))
Arguments
- widget
A
tabulator()
HTML widget.- columns
The names of the columns the formatter is applied to.
- hoz_align
(character): The horizontal alignment of the column.
Value
The updated tabulator()
HTML widget
Examples
data <- data.frame(
id = c(1, 2, 3, 4, 5, 6, 7),
text_style = c(
"<i>Italic</i>",
"<b>Bold</b>",
"<span style='color: green'>Green</span>",
"<del>Deleted</del>",
"<small>Small</small>",
"H<sub>2</sub>O",
"x<sup>2</sup>"
)
)
tabulator(data, width = 400) |>
set_formatter_html("text_style")