Open dipterix opened 3 days ago
Currently there is no support for htmlwidgets by quarto-webr.
htmlwidgets
quarto-webr
I somehow managed to get it working. Here I would like to propose this method, hopefully it can be integrated into quarto-webr.
Basically there are two changed needed to visualize htmlwidgets via webr:
webr
selfcontained
browse
webr::viewer_install()
For Step 1, users can use this work-around or wait for htmlwidgets to add this feature. Step 2 needs to be done from quarto-webr (see PR https://github.com/coatless/quarto-webr/pull/223).
library(dygraphs) view <- function(widget) { webr::viewer_install() path <- save_selfcontained(v) getOption("viewer")(path) } v <- dygraph(nhtemp, main = "New Haven Temperatures") %>% dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01")) view(v)
Here's an example with the PR:
https://rave.wiki/posts/3dviewer/viewer201.html
@dipterix thanks! I'll check out the PR tomorrow in more depth.
P.S. Woahza, that's a really nice embedding demo.
Would love to see this feature integrated too!
Feature Description
Currently there is no support for
htmlwidgets
byquarto-webr
.I somehow managed to get it working. Here I would like to propose this method, hopefully it can be integrated into
quarto-webr
.Basically there are two changed needed to visualize
htmlwidgets
viawebr
:selfcontained
quarto-webr
needs to supportbrowse
type (introduced bywebr::viewer_install()
For Step 1, users can use this work-around or wait for
htmlwidgets
to add this feature. Step 2 needs to be done fromquarto-webr
(see PR https://github.com/coatless/quarto-webr/pull/223).