Description Usage Arguments Details Examples
shinyapp to convert shinyAce to images for code sharing
1 2 3 4 5 | carbonace(
init = "x <- 1",
viewer = shiny::paneViewer(),
ace_opts = ace_settings()
)
|
init |
character, intial script to initialize shinyAce with. |
viewer |
which viewer to open the app in. Default: shiny::paneViewer() |
ace_opts |
user specific settings tp pass to the aceEditor. Default: ace_settings() |
The app has an RStudio addin, which you can highlight text in the editor and the app will initialize with the contents.
use ace_settings() to set user specific values for the editor.
Default options are:
Field | Value |
theme | "ambience" |
mode | 'r' |
fontSize | 12 |
tabSize | 4 |
value | init |
wordWrap | TRUE |
autoScrollEditorIntoView | TRUE |
maxLines | Inf |
placeholder | "Show a placeholder when the editor is empty ..." |
1 2 3 4 5 6 | if(interactive()){
carbonace:::carbonace()
# Use ace_settings to change initial theme
# carbonace:::carbonace(ace_opts = ace_settings(theme = 'chrome'))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.