Index

Functions

Variables

Enumerations

Classes

Interfaces

Type aliases

Events

Functions

colorize

colorizeElement

colorizeModelLine

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

    Parameters

    • model: ITextModel
    • lineNumber: number
    • Optional tabSize: number

    Returns string

create

createDiffEditor

createDiffNavigator

createModel

  • createModel(value: string, language?: string, uri?: Uri): ITextModel
  • 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 ITextModel

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 and/or resource

    Parameters

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

    Returns IMarker[]

    list of markers

getModels

  • getModels(): ITextModel[]
  • Get all the created models.

    Returns ITextModel[]

setModelLanguage

  • setModelLanguage(model: ITextModel, languageId: string): void

setModelMarkers

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

    Parameters

    • model: ITextModel
    • 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

Const 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

IEditorViewState

An editor view state.

IModel

IModel: ITextModel

IReadOnlyModel

IReadOnlyModel: ITextModel

Events

onDidChangeModelLanguage

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

    Parameters

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

          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