aceEditor: Render Ace

Description Usage Arguments Author(s) Examples

Description

Render an Ace editor on an application page.

Usage

1
2
3
4
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, keyId = NULL)

Arguments

outputId

The ID associated with this element

value

The initial text to be contained in the editor.

mode

The Ace mode to be used by the editor. The mode in Ace is often the programming or markup language that you're using and determines things like syntax highlighting and code folding. Use the getAceModes function to enumerate all the modes available.

theme

The Ace theme to be used by the editor. The theme in Ace determines the styling and coloring of the editor. Use getAceThemes to enumerate all the themes available.

readOnly

If set to TRUE, Ace will disable client-side editing. If FALSE (the default), it will enable editing.

height

A number (which will be interpreted as a number of pixels) or any valid CSS dimension (such as "50%", "200px", or "auto").

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 TRUE, Ace will enable word wrapping. Default value is FALSE.

cursorId

The ID associated with a cursor change.

selectionId

The ID associated with a change of selected text

keyId

A list whose names are ID names and whose elements are the short-cuts of keys (see example)

Author(s)

Jeff Allen jeff@trestletech.com

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
 aceEditor("myEditor", "Initial text for editor here", mode="r",
   theme="ambiance")

 aceEditor("myCodeEditor", "# Enter code", mode="r",
   keyId = list(helpKey="F1",runKey="Ctrl-R|Ctrl-Shift-Enter"),
   wordWrap=TRUE, debounce=10)

## End(Not run)

skranz/shinyAce2 documentation built on May 30, 2019, 3:02 a.m.