Writes an HTML widget's main container <div>
and data <script>
tags to file.
Details
Other than htmlwidgets::saveWidget()
, this function does not write a complete HTML document but only the widget's core tags. Hence it is intended to
create files which are in turn included in another HTML file, e.g. via a static site generator. The HTML widget's dependencies must be handled separately,
e.g. using write_widget_deps()
.
To directly get the HTML widget's core tags as a character scalar, use as.character(htmltools::tagList(x))
.
See also
Other HTML widget functions:
write_widget_deps()