set_editor | R Documentation |
Set editor
set_editor(
widget,
column,
editor = c("input", "textarea", "number", "range", "tickCross", "star", "progress",
"date", "time", "datetime", "list"),
validator = NULL,
...
)
widget |
A |
column |
The name of the column the formatter is applied to. |
editor |
(character): The editor type. |
validator |
(character vector): One or more validators to validate user input. |
... |
Optional editor parameters depending on the selected editor. |
The updated tabulator()
HTML widget
https://tabulator.info/docs/6.2/edit for available editors
https://tabulator.info/docs/6.2/validate for available validators
setup <- tabulator_options(edit_trigger_event = "click")
tabulator(iris[, c(2, 5)], setup) |>
set_editor(
column = "Species",
editor = "list",
values_lookup = "active",
clearable = TRUE,
autocomplete = TRUE
) |>
set_editor(
column = "Sepal_Width",
editor = "number",
min = 0,
max = 10,
step = 0.1,
validator = c("min:0", "max:10")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.