| aceEditor {shinyAce} | R Documentation |
Render an Ace editor on an application page.
aceEditor(outputId, value, mode, theme, vimKeyBinding = FALSE,
readOnly = FALSE, height = "400px", fontSize = 12, debounce = 1000,
wordWrap = FALSE, showLineNumbers = TRUE, highlightActiveLine = TRUE,
selectionId = NULL, cursorId = NULL, hotkeys = NULL,
autoComplete = c("disabled", "enabled", "live"), autoCompleters = "",
autoCompleteList = NULL, tabSize = 4, useSoftTabs = TRUE,
showInvisibles = FALSE, setBehavioursEnabled = TRUE)
outputId |
The ID associated with this element |
value |
The initial text to be contained in the editor. |
mode |
The Ace |
theme |
The Ace |
vimKeyBinding |
If set to |
readOnly |
If set to |
height |
A number (which will be interpreted as a number of pixels) or
any valid CSS dimension (such as " |
fontSize |
Defines the font size (in px) used in the editor and should be an integer. The default is 12. |
debounce |
The number of milliseconds to debounce the input. This will cause the client to withhold update notifications until the user has stopped typing for this amount of time. If 0, the server will be notified of every keystroke as it happens. |
wordWrap |
If set to |
showLineNumbers |
If set to |
highlightActiveLine |
If set to |
selectionId |
The ID associated with a change of selected text |
cursorId |
The ID associated with a cursor change. |
hotkeys |
A list whose names are ID names and whose elements are the shortcuts of keys. Shortcuts can either be a simple string or a list with elements 'win' and 'mac' that that specifies different shortcuts for win and mac (see example). |
autoComplete |
Enable/Disable auto code completion. Must be one of the following:
By default, only local completer is used where all aforementioned code pieces
will be considered as candidates. Use |
autoCompleters |
List of completers to enable. If set to |
autoCompleteList |
A named list that contains static code completions
candidates. This can be especially useful for Non-Standard Evaluation (NSE)
functions such as those in |
tabSize |
Set tab size. Default value is 4 |
useSoftTabs |
Replace tabs by spaces. Default value is TRUE |
showInvisibles |
Show invisible characters (e.g., spaces, tabs, newline characters). Default value is FALSE |
setBehavioursEnabled |
Determines if the auto-pairing of special characters, like quotation marks, parenthesis, or brackets should be enabled. Default value is TRUE. |
Jeff Allen jeff@trestletech.com
## Not run:
aceEditor(
outputId = "myEditor",
value = "Initial text for editor here",
mode = "r",
theme = "ambiance"
)
aceEditor(
outputId = "myCodeEditor",
value = "# Enter code",
mode = "r",
hotkeys = list(
helpKey = "F1",
runKey = list(
win = "Ctrl-R|Ctrl-Shift-Enter",
mac = "CMD-ENTER|CMD-SHIFT-ENTER"
)
),
wordWrap = TRUE, debounce = 10
)
aceEditor(
outputId = "mySmartEditor",
value = "plot(wt ~ mpg, data = mtcars)",
mode = "r",
autoComplete = "live",
autoCompleteList = list(mtcars = colnames(mtcars))
)
## End(Not run)