Learn R Programming

shinyAce (version 0.4.3)

updateAceEditor: Update Ace Editor

Description

Update the styling or mode of an aceEditor component.

Usage

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
)

Arguments

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 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.

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.

fontSize

If set, will update the font size (in px) used in the editor. Should be an integer.

showLineNumbers

If set to TRUE, Ace will show line numbers.

wordWrap

If set to TRUE, Ace will enable word wrapping. Default value is FALSE.

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 border 'normal', 'alert', or 'flash'.

autoComplete

Enable/Disable code completion. See aceEditor for details.

autoCompleters

Character vector of completers to enable. If set to NULL, all completers will be disabled.

autoCompleteList

If set to NULL, existing static completions list will be unset. See aceEditor for details.

Author

Jeff Allen jeff@trestletech.com