Index

Functions

Variables

Enumerations

Classes

Interfaces

Type aliases

Events

Functions

colorize

colorizeElement

colorizeModelLine

  • colorizeModelLine(model: IModel, lineNumber: number, tabSize?: number): string
  • Colorize a line in a model.

    Parameters

    • model: IModel
    • lineNumber: number
    • Optional tabSize: number

    Returns string

create

createDiffEditor

createDiffNavigator

createModel

  • createModel(value: string, language?: string, uri?: Uri): IModel
  • Create a new editor model. You can specify the language that should be set for this model or let the language be inferred from the uri.

    Parameters

    • value: string
    • Optional language: string
    • Optional uri: Uri

    Returns IModel

createWebWorker

  • Create a new web worker that has model syncing capabilities built in. Specify an AMD module to load that will create an object that will be proxied.

    Type parameters

    • T

    Parameters

    Returns MonacoWebWorker<T>

defineTheme

getModel

getModelMarkers

  • getModelMarkers(filter: object): IMarker[]
  • Get markers for owner ant/or resource

    Parameters

    • filter: object
      • Optional owner?: string
      • Optional resource?: Uri
      • Optional take?: number

    Returns IMarker[]

    list of markers

getModels

  • getModels(): IModel[]

setModelLanguage

  • setModelLanguage(model: IModel, language: string): void
  • Change the language for a model.

    Parameters

    • model: IModel
    • language: string

    Returns void

setModelMarkers

  • setModelMarkers(model: IModel, owner: string, markers: IMarkerData[]): void
  • Set the markers for a model.

    Parameters

    • model: IModel
    • owner: string
    • markers: IMarkerData[]

    Returns void

setTheme

  • setTheme(themeName: string): void
  • Switches to a theme.

    Parameters

    • themeName: string

    Returns void

tokenize

  • tokenize(text: string, languageId: string): Token[][]
  • Tokenize text using language languageId

    Parameters

    • text: string
    • languageId: string

    Returns Token[][]

Variables

EditorType

EditorType: object

The type of the IEditor.

Type declaration

  • ICodeEditor: string
  • IDiffEditor: string

Type aliases

BuiltinTheme

BuiltinTheme: "vs" | "vs-dark" | "hc-black"

IColors

IColors: object

Type declaration

  • [colorId: string]: string

IEditorModel

IEditorModel: IModel | IDiffEditorModel

IEditorViewState

An editor view state.

Events

onDidChangeModelLanguage

  • onDidChangeModelLanguage(listener: function): IDisposable
  • Emitted when a different language is set to a model.

    Parameters

    • listener: function
        • (e: object): void
        • Parameters

          • e: object
            • model: IModel
            • oldLanguage: string

          Returns void

    Returns IDisposable

onDidCreateEditor

  • Emitted when an editor is created. Creating a diff editor might cause this listener to be invoked with the two editors.

    Parameters

    Returns IDisposable

onDidCreateModel

onWillDisposeModel