Learn R Programming

aceEditor (version 1.0.1)

aceDiffEditor: Ace diff editor

Description

Open the Ace diff editor.

Usage

aceDiffEditor(
  file1,
  file2,
  mode = NULL,
  theme = NULL,
  fontSize = 14,
  tabSize = NULL,
  autoCompletion = TRUE,
  snippets = FALSE,
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

file1, file2

paths to files

mode

the language of the files; if NULL, the mode is guessed from the extension of the first file; run getAceModes to get the list of available modes

theme

the theme of the editor; if NULL, the theme is set to the theme currently used in RStudio; run getAceThemes to get the list of available themes

fontSize

font size

tabSize

number of spaces for the indentation (usually 2 or 4); if NULL, it is set to the one used in RStudio

autoCompletion

logical, whether to enable the auto completion

snippets

logical, whether to enable the snippets (for example, there is a snippet for switch in JavaScript)

width, height

dimensions; the default values are nice for usage in the RStudio viewer pane

elementId

a HTML id for the container; this is useless for common usage

Examples

Run this code
# NOT RUN {
file <- system.file("htmlwidgets", "aceEditor.css", package = "aceEditor")
aceDiffEditor(file, file)
# }

Run the code above in your browser using DataLab