Closed atusy closed 5 years ago
Hi,
You can toggle raw HTML rendering by setting html = TRUE
on a column definition:
reactable::reactable(
data.frame(
pkg = '<a href = "https://github/com/glin/reactable">reactable</a>',
stringsAsFactors = FALSE
),
columns = list(
pkg = colDef(html = TRUE)
)
)
There's no table-level setting, but to enable it for all columns, you can use the default column definition:
reactable::reactable(
data.frame(
pkg = '<a href = "https://github/com/glin/reactable">reactable</a>',
stringsAsFactors = FALSE
),
defaultColDef = colDef(html = TRUE)
)
Alternatively, you could use htmltools inside a cell render function like this example: https://glin.github.io/reactable/articles/examples.html#cell-renderers
Thanks! it works perfectly!!
It would be nice if we can easily toggle parsing HTML inside cells. I found a related question in Spectrum, but have no idea how to use it in R.
https://spectrum.chat/react-table/general/passing-html-in-through-accessors~36982f4c-1f49-43ab-9a97-f9128176d78f
I want to do something like
It would be nice if
reactable()
supports the feature by an argument likeescape
,inner_html
, or something like that requiring boolean.