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.
Arguments
- example
The short name of the exercise or example, e.g.
ride-share-fares
. Alternatively, the path to a folder containing examples or the path to an example file directly.repl_example(example = NULL)
opens an interactive browser to select an example, otherwiserepl()
andrepl_js()
will open with blank editors.- js_repl_only
When
TRUE
, the app is simplified to contain only a JavaScript source editor and a console output.repl_js()
is an alias to launchrepl()
withjs_repl_only = TRUE
.- theme_app
The theme of the app, using shinythemes. See
shinythemes::shinytheme()
for a list of valid themes.- theme_editor
The theme of the shinyAce source code editors. See
shinyAce::getAceThemes()
for a list of valid themes.- autocomplete
Ace Editor language modes for which autocomplete will be enabled. One or more of
"js"
,"css"
, or"html"
. By default autocomplete is enabled in all but the JavaScript mode. "Disabling" autocomplete here actually doesn't mean disabling all together. Autocomplete will still be available by pressingCtrl
+space
.- render_dir
Where to render temporary files, defaults to
tempdir()
- options
Options passed to
shiny::runApp()
.- ...
Arguments passed from
repl_js()
torepl()
or fromrepl()
toshiny::shinyApp()
.