View source: R/update-ace-editor.R
updateAceEditor | R Documentation |
Update the styling or mode of an aceEditor component.
updateAceEditor(
session,
editorId,
value,
theme,
readOnly,
mode,
fontSize,
showLineNumbers,
wordWrap,
useSoftTabs,
tabSize,
showInvisibles,
showPrintMargin,
border = c("normal", "alert", "flash"),
autoComplete = c("disabled", "enabled", "live"),
autoCompleters = c("snippet", "text", "keyword", "static", "rlang"),
autoCompleteList = NULL
)
session |
The Shiny session to whom the editor belongs |
editorId |
The ID associated with this element |
value |
The initial text to be contained in the editor. |
theme |
The Ace |
readOnly |
If set to |
mode |
The Ace |
fontSize |
If set, will update the font size (in px) used in the editor. Should be an integer. |
showLineNumbers |
If set to |
wordWrap |
If set to |
useSoftTabs |
Replace tabs by spaces. Default value is TRUE |
tabSize |
Set tab size. Default value is 4 |
showInvisibles |
Show invisible characters (e.g., spaces, tabs, newline characters). Default value is FALSE |
showPrintMargin |
Show print margin. Default value is True |
border |
Set the |
autoComplete |
Enable/Disable code completion. See |
autoCompleters |
Character vector of completers to enable. If set to |
autoCompleteList |
If set to |
Jeff Allen jeff@trestletech.com
## Not run:
shinyServer(function(input, output, session) {
observe({
updateAceEditor(session, "myEditor", "Updated text for editor here",
mode = "r", theme = "ambiance")
})
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.