gcodemirror: codemirror

Description Usage Arguments Details Value Author(s)

View source: R/gtext.R

Description

A gtext object modified to use codemirror for syntax highlighting

Usage

1
2
gcodemirror(text = "", container = NULL, ..., width = NULL,
  height = NULL, ext.args = list())

Arguments

text

initial text.

container

A parent container. In gWidgetsWWW2 a parent container is not optional (though it can be substituted with the parent argument in some circumstances). The parent specifies the widget heirarchy and the ... argument is used to pass along arguments to layout the child component in the parent container. Typically, these are passed to the add method of the parent container.

...

Used to pass along argument to the parent container's add method and possible other arguments to the underlying ference class constructors.

width

width in pixels of component. Sizing in gWidgetsWWW2 is sometimes necessary as the arguments expand and fill are not well implemented.

height

height in pixels of the component.

ext.args

The contructors of gWidgetsWWW2 ultimately call an Ext constructor. The options passed to the Ext constructor may be added to or overridden by use of this argument. Values are passed in as named list components and with values converted into JavaScript objects by asJSObject.

Details

The CodeMirror project (codemirror.net) provides a code editor in javascript with an R mode. This widget incorporates that into gWidgetsWWW2. This does R syntax highlighting. To use codemirror with gtext (and no highlighting), pass the argument use.codemirror=TRUE to the gtext call.

Value

a GCodeMirror reference class

Author(s)

john verzani


jverzani/gWidgetsWWW2 documentation built on May 18, 2017, 2 p.m.