Learn R Programming

shinyAce (version 0.1.0)

updateAceEditor: Update Ace Editor

Description

Update the styling or mode of an aceEditor component.

Usage

updateAceEditor(session, editorId, value, theme,
    readOnly, mode, fontSize)

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.
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
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.
fontSize
If set, will update the font size (in px) used in the editor. Should be an integer.

Examples

Run this code
shinyServer(function(input, output, session) {
   observe({
     updateAceEditor(session, "myEditor", "Updated text for editor here",
       mode="r", theme="ambiance")
   })
 }

Run the code above in your browser using DataLab