R/get-ace-modes.R

Defines functions getAceModes

Documented in getAceModes

#' Get available modes
#'
#' Gets all of the available \code{modes} available in the installed version
#' of shinyAce. Modes are often the programming or markup language which will
#' be used in the editor and determine things like syntax highlighting and
#' code folding.
#' @author Jeff Allen \email{jeff@@trestletech.com}
#' @export
getAceModes <- function() {
  modes <- dir(system.file("www/ace", package = "shinyAce"), "^mode-.*.js$")
  sub("^mode-(.*).js$", "\\1", modes)
}

Try the shinyAce package in your browser

Any scripts or data that you put into this service are public.

shinyAce documentation built on May 6, 2022, 9:07 a.m.