Description Usage Arguments Examples
View source: R/downloadWidget.R
Shiny module to save shiny widgets as html
files. Internally, the
conversion is done with htmlwidgets::saveWidget
.
1 2 3 | widgetDownload(input, output, session, rWidget, filename = "widget.html")
widgetDownloadUI(id, btnText = "Download widget")
|
input, output, session |
Standard shiny module parameters |
rWidget |
A reactive returning a shiny widget |
filename |
Argument to be passed to shiny::downloadHandler |
id |
The id of the module |
btnText |
The text appearing on the download button |
1 2 3 4 5 6 7 8 9 | ## Not run:
shinyApp(
fluidPage(widgetDownloadUI("wd")),
function(input, output, session) {
callModule(widgetDownload, "wd", reactive({ DT::datatable(mtcars) }))
}
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.