View source: R/html_document_js4shiny.R
html_document_js4shiny | R Documentation |
This document type is built on the html_document_plain()
, but is configured
to render the example documents created by the repl()
. You may choose to
render the solution or the example's initial state by setting the output
option version
.
html_document_js4shiny(version = c("solution", "initial"), ...)
version |
Which version of the example to render. One of |
... |
Additional arguments passed to |
html_document_plain()
html_document_js()
if (rmarkdown::pandoc_available("1.12.3")) {
css_ex <- system.file(
"examples", "css", "css-basics", "css-basics-appearance.Rmd",
package = "js4shiny"
)
tmp_html_init <- tempfile("initial", fileext = ".html")
tmp_html_sol <- tempfile("solution", fileext = ".html")
tmp_html_init <- rmarkdown::render(
input = css_ex,
output_file = tmp_html_init,
output_options = list(version = "initial"),
quiet = TRUE
)
tmp_html_sol <- rmarkdown::render(
input = css_ex,
output_file = tmp_html_sol,
output_options = list(version = "solution"),
quiet = TRUE
)
}
# View tmp_html_init/sol
# browseURL(tmp_html_init)
# browseURL(tmp_html_sol)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.