repl_example | R Documentation |
Launches an interactive Shiny app for live editing of frontend JavaScript,
CSS, and HTML/Markdown/R Markdown. The app allows users to write JS, CSS and
HTML, preview the final product, observe the JavaScript console (specifically
items printed to the console via console.log()
), and download a zip file
containing the source files.
repl_example(example = NULL)
repl(
example = NULL,
js_repl_only = FALSE,
theme_app = NULL,
theme_editor = "textmate",
autocomplete = c("css", "html"),
render_dir = NULL,
options = list(),
...
)
repl_js(..., render_dir = NULL)
example |
The short name of the exercise or example, e.g.
|
js_repl_only |
When |
theme_app |
The theme of the app, using shinythemes. See
|
theme_editor |
The theme of the shinyAce source code editors. See
|
autocomplete |
Ace Editor language modes for which autocomplete will be
enabled. One or more of |
render_dir |
Where to render temporary files, defaults to |
options |
Options passed to |
... |
Arguments passed from |
A shiny app
repl_example
: Launch a js4shiny exercise or example using the
example slug, or the full filename. If none provided, repl_example()
launches an interactive example browser.
The app was developed for the js4shiny rstudio::conf workshop and can be used to load examples for practicing and learning JavaScript and web development concepts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.