Interface IStandaloneCodeEditor

Expand description

A rich code editor.

interface IStandaloneCodeEditor {
    inComposition: boolean;
    onBeginUpdate: IEvent<void>;
    onContextMenu: IEvent<IEditorMouseEvent>;
    onDidAttemptReadOnlyEdit: IEvent<void>;
    onDidBlurEditorText: IEvent<void>;
    onDidBlurEditorWidget: IEvent<void>;
    onDidChangeConfiguration: IEvent<
        ConfigurationChangedEvent,
    >;
    onDidChangeCursorPosition: IEvent<
        ICursorPositionChangedEvent,
    >;
    onDidChangeCursorSelection: IEvent<
        ICursorSelectionChangedEvent,
    >;
    onDidChangeHiddenAreas: IEvent<void>;
    onDidChangeModel: IEvent<IModelChangedEvent>;
    onDidChangeModelContent: IEvent<
        IModelContentChangedEvent,
    >;
    onDidChangeModelDecorations: IEvent<
        IModelDecorationsChangedEvent,
    >;
    onDidChangeModelLanguage: IEvent<
        IModelLanguageChangedEvent,
    >;
    onDidChangeModelLanguageConfiguration: IEvent<
        IModelLanguageConfigurationChangedEvent,
    >;
    onDidChangeModelOptions: IEvent<
        IModelOptionsChangedEvent,
    >;
    onDidCompositionEnd: IEvent<void>;
    onDidCompositionStart: IEvent<void>;
    onDidContentSizeChange: IEvent<
        IContentSizeChangedEvent,
    >;
    onDidFocusEditorText: IEvent<void>;
    onDidFocusEditorWidget: IEvent<void>;
    onDidLayoutChange: IEvent<EditorLayoutInfo>;
    onDidPaste: IEvent<IPasteEvent>;
    onDidScrollChange: IEvent<IScrollEvent>;
    onEndUpdate: IEvent<void>;
    onKeyDown: IEvent<IKeyboardEvent>;
    onKeyUp: IEvent<IKeyboardEvent>;
    onMouseDown: IEvent<IEditorMouseEvent>;
    onMouseLeave: IEvent<IPartialEditorMouseEvent>;
    onMouseMove: IEvent<IEditorMouseEvent>;
    onMouseUp: IEvent<IEditorMouseEvent>;
    onWillChangeModel: IEvent<IModelChangedEvent>;
    addAction(descriptor: IActionDescriptor): IDisposable;
    addCommand(
        keybinding: number,
        handler: ICommandHandler,
        context?: string,
    ): string;
    addContentWidget(widget: IContentWidget): void;
    addGlyphMarginWidget(widget: IGlyphMarginWidget): void;
    addOverlayWidget(widget: IOverlayWidget): void;
    applyFontInfo(target: HTMLElement): void;
    changeViewZones(
        callback: (
            accessor: IViewZoneChangeAccessor,
        ) => void,
    ): void;
    createContextKey<
        T extends ContextKeyValue = ContextKeyValue,
    >(
        key: string,
        defaultValue: T,
    ): IContextKey<T>;
    createDecorationsCollection(
        decorations?: IModelDeltaDecoration[],
    ): IEditorDecorationsCollection;
    deltaDecorations(
        oldDecorations: string[],
        newDecorations: IModelDeltaDecoration[],
    ): string[];
    dispose(): void;
    executeCommand(source: string, command: ICommand): void;
    executeCommands(
        source: string,
        commands: ICommand[],
    ): void;
    executeEdits(
        source: string,
        edits: IIdentifiedSingleEditOperation[],
        endCursorState?: ICursorStateComputer | Selection[],
    ): boolean;
    focus(): void;
    getAction(id: string): IEditorAction;
    getBottomForLineNumber(lineNumber: number): number;
    getContainerDomNode(): HTMLElement;
    getContentHeight(): number;
    getContentWidth(): number;
    getContribution<T extends IEditorContribution>(
        id: string,
    ): T;
    getDecorationsInRange(range: Range): IModelDecoration[];
    getDomNode(): HTMLElement;
    getEditorType(): string;
    getFontSizeAtPosition(position: IPosition): string;
    getId(): string;
    getLayoutInfo(): EditorLayoutInfo;
    getLineDecorations(
        lineNumber: number,
    ): IModelDecoration[];
    getLineHeightForPosition(position: IPosition): number;
    getModel(): ITextModel;
    getOffsetForColumn(
        lineNumber: number,
        column: number,
    ): number;
    getOption<T extends EditorOption>(
        id: T,
    ): FindComputedEditorOptionValueById<T>;
    getOptions(): IComputedEditorOptions;
    getPosition(): Position;
    getRawOptions(): IEditorOptions;
    getScrolledVisiblePosition(
        position: IPosition,
    ): { height: number; left: number; top: number };
    getScrollHeight(): number;
    getScrollLeft(): number;
    getScrollTop(): number;
    getScrollWidth(): number;
    getSelection(): Selection;
    getSelections(): Selection[];
    getSupportedActions(): IEditorAction[];
    getTargetAtClientPoint(
        clientX: number,
        clientY: number,
    ): IMouseTarget;
    getTopForLineNumber(
        lineNumber: number,
        includeViewZones?: boolean,
    ): number;
    getTopForPosition(
        lineNumber: number,
        column: number,
    ): number;
    getValue(
        options?: {
            lineEnding: string;
            preserveBOM: boolean;
        },
    ): string;
    getVisibleColumnFromPosition(
        position: IPosition,
    ): number;
    getVisibleRanges(): Range[];
    handleInitialized?(): void;
    hasPendingScrollAnimation(): boolean;
    hasTextFocus(): boolean;
    hasWidgetFocus(): boolean;
    layout(
        dimension?: IDimension,
        postponeRendering?: boolean,
    ): void;
    layoutContentWidget(widget: IContentWidget): void;
    layoutGlyphMarginWidget(
        widget: IGlyphMarginWidget,
    ): void;
    layoutOverlayWidget(widget: IOverlayWidget): void;
    onDidDispose(listener: () => void): IDisposable;
    popUndoStop(): boolean;
    pushUndoStop(): boolean;
    removeContentWidget(widget: IContentWidget): void;
    removeDecorations(decorationIds: string[]): void;
    removeGlyphMarginWidget(
        widget: IGlyphMarginWidget,
    ): void;
    removeOverlayWidget(widget: IOverlayWidget): void;
    render(forceRedraw?: boolean): void;
    restoreViewState(state: ICodeEditorViewState): void;
    revealLine(
        lineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLineInCenter(
        lineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLineInCenterIfOutsideViewport(
        lineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLineNearTop(
        lineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLines(
        startLineNumber: number,
        endLineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLinesInCenter(
        lineNumber: number,
        endLineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLinesInCenterIfOutsideViewport(
        lineNumber: number,
        endLineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealLinesNearTop(
        lineNumber: number,
        endLineNumber: number,
        scrollType?: ScrollType,
    ): void;
    revealPosition(
        position: IPosition,
        scrollType?: ScrollType,
    ): void;
    revealPositionInCenter(
        position: IPosition,
        scrollType?: ScrollType,
    ): void;
    revealPositionInCenterIfOutsideViewport(
        position: IPosition,
        scrollType?: ScrollType,
    ): void;
    revealPositionNearTop(
        position: IPosition,
        scrollType?: ScrollType,
    ): void;
    revealRange(
        range: IRange,
        scrollType?: ScrollType,
    ): void;
    revealRangeAtTop(
        range: IRange,
        scrollType?: ScrollType,
    ): void;
    revealRangeInCenter(
        range: IRange,
        scrollType?: ScrollType,
    ): void;
    revealRangeInCenterIfOutsideViewport(
        range: IRange,
        scrollType?: ScrollType,
    ): void;
    revealRangeNearTop(
        range: IRange,
        scrollType?: ScrollType,
    ): void;
    revealRangeNearTopIfOutsideViewport(
        range: IRange,
        scrollType?: ScrollType,
    ): void;
    saveViewState(): ICodeEditorViewState;
    setBanner(
        bannerDomNode: HTMLElement,
        height: number,
    ): void;
    setModel(model: ITextModel): void;
    setPosition(position: IPosition, source?: string): void;
    setScrollLeft(
        newScrollLeft: number,
        scrollType?: ScrollType,
    ): void;
    setScrollPosition(
        position: INewScrollPosition,
        scrollType?: ScrollType,
    ): void;
    setScrollTop(
        newScrollTop: number,
        scrollType?: ScrollType,
    ): void;
    setSelection(selection: IRange, source?: string): void;
    setSelection(selection: Range, source?: string): void;
    setSelection(
        selection: ISelection,
        source?: string,
    ): void;
    setSelection(
        selection: Selection,
        source?: string,
    ): void;
    setSelections(
        selections: readonly ISelection[],
        source?: string,
    ): void;
    setValue(newValue: string): void;
    trigger(
        source: string,
        handlerId: string,
        payload: unknown,
    ): void;
    updateOptions(
        newOptions: IEditorOptions & IGlobalEditorOptions,
    ): void;
    writeScreenReaderContent(reason: string): void;
}

Properties§

§readonly inComposition: boolean

Boolean indicating whether input is in composition

§readonly onBeginUpdate: IEvent<void>

Some editor operations fire multiple events at once. To allow users to react to multiple events fired by a single operation, the editor fires a begin update before the operation and an end update after the operation. Whenever the editor fires onBeginUpdate, it will also fire onEndUpdate once the operation finishes. Note that not all operations are bracketed by onBeginUpdate and onEndUpdate.

§readonly onDidCompositionEnd: IEvent<void>

An event emitted after composition has ended.

§readonly onDidCompositionStart: IEvent<void>

An event emitted after composition has started.

§readonly onEndUpdate: IEvent<void>

Fires after the editor completes the operation it fired onBeginUpdate for.

Methods§

§

addAction(descriptor: IActionDescriptor): IDisposable

§

addCommand(
    keybinding: number,
    handler: ICommandHandler,
    context?: string,
): string

§

addContentWidget(widget: IContentWidget): void

Add a content widget. Widgets must have unique ids, otherwise they will be overwritten.

§

addGlyphMarginWidget(widget: IGlyphMarginWidget): void

Add a glyph margin widget. Widgets must have unique ids, otherwise they will be overwritten.

§

addOverlayWidget(widget: IOverlayWidget): void

Add an overlay widget. Widgets must have unique ids, otherwise they will be overwritten.

§

applyFontInfo(target: HTMLElement): void

Apply the same font settings as the editor to target.

§

changeViewZones(
    callback: (
        accessor: IViewZoneChangeAccessor,
    ) => void,
): void

Change the view zones. View zones are lost when a new model is attached to the editor.

§

createContextKey<
    T extends ContextKeyValue = ContextKeyValue,
>(
    key: string,
    defaultValue: T,
): IContextKey<T>

§

createDecorationsCollection(
    decorations?: IModelDeltaDecoration[],
): IEditorDecorationsCollection

Create a collection of decorations. All decorations added through this collection will get the ownerId of the editor (meaning they will not show up in other editors). These decorations will be automatically cleared when the editor's model changes.

§

deltaDecorations(
    oldDecorations: string[],
    newDecorations: IModelDeltaDecoration[],
): string[]

All decorations added through this call will get the ownerId of this editor.

deprecated

Use createDecorationsCollection

see

createDecorationsCollection

§

dispose(): void

Dispose the editor.

§

executeCommand(source: string, command: ICommand): void

Execute a command on the editor. The edits will land on the undo-redo stack, but no "undo stop" will be pushed.

§

executeCommands(source: string, commands: ICommand[]): void

Execute multiple (concomitant) commands on the editor.

§

executeEdits(
    source: string,
    edits: IIdentifiedSingleEditOperation[],
    endCursorState?: ICursorStateComputer | Selection[],
): boolean

Execute edits on the editor. The edits will land on the undo-redo stack, but no "undo stop" will be pushed.

§

focus(): void

Brings browser focus to the editor text

§

getAction(id: string): IEditorAction

Get an action that is a contribution to this editor.

id

Unique identifier of the contribution.

§

getBottomForLineNumber(lineNumber: number): number

Get the vertical position (top offset) for the line's bottom w.r.t. to the first line.

§

getContainerDomNode(): HTMLElement

Returns the editor's container dom node

§

getContentHeight(): number

Get the height of the editor's content. This is information that is "erased" when computing scrollHeight = Math.max(contentHeight, height)

§

getContentWidth(): number

Get the width of the editor's content. This is information that is "erased" when computing scrollWidth = Math.max(contentWidth, width)

§

getContribution<T extends IEditorContribution>(
    id: string,
): T

Get a contribution of this editor.

id

Unique identifier of the contribution.

§

getDecorationsInRange(range: Range): IModelDecoration[]

Get all the decorations for a range (filtering out decorations from other editors).

§

getDomNode(): HTMLElement

Returns the editor's dom node

§

getEditorType(): string

Get the editor type. Please see EditorType. This is to avoid an instanceof check

§

getFontSizeAtPosition(position: IPosition): string

Get the font size at a given position

§

getId(): string

Get a unique id for this editor instance.

§

getLayoutInfo(): EditorLayoutInfo

Get the layout info for the editor.

§

getLineDecorations(lineNumber: number): IModelDecoration[]

Get all the decorations on a line (filtering out decorations from other editors).

§

getLineHeightForPosition(position: IPosition): number

Get the line height for a model position.

§

getModel(): ITextModel

Type the getModel() of IEditor.

§

getOffsetForColumn(
    lineNumber: number,
    column: number,
): number

Get the horizontal position (left offset) for the column w.r.t to the beginning of the line. This method works only if the line lineNumber is currently rendered (in the editor's viewport). Use this method with caution.

§

getOption<T extends EditorOption>(
    id: T,
): FindComputedEditorOptionValueById<T>

Gets a specific editor option.

§

getOptions(): IComputedEditorOptions

Gets all the editor computed options.

§

getPosition(): Position

Returns the primary position of the cursor.

§

getRawOptions(): IEditorOptions

Returns the editor's configuration (without any validation or defaults).

§

getScrolledVisiblePosition(
    position: IPosition,
): { height: number; left: number; top: number }

Get the visible position for position. The result position takes scrolling into account and is relative to the top left corner of the editor. Explanation 1: the results of this method will change for the same position if the user scrolls the editor. Explanation 2: the results of this method will not change if the container of the editor gets repositioned. Warning: the results of this method are inaccurate for positions that are outside the current editor viewport.

§

getScrollHeight(): number

Get the scrollHeight of the editor's viewport.

§

getScrollLeft(): number

Get the scrollLeft of the editor's viewport.

§

getScrollTop(): number

Get the scrollTop of the editor's viewport.

§

getScrollWidth(): number

Get the scrollWidth of the editor's viewport.

§

getSelection(): Selection

Returns the primary selection of the editor.

§

getSelections(): Selection[]

Returns all the selections of the editor.

§

getSupportedActions(): IEditorAction[]

Returns all actions associated with this editor.

§

getTargetAtClientPoint(
    clientX: number,
    clientY: number,
): IMouseTarget

Get the hit test target at coordinates clientX and clientY. The coordinates are relative to the top-left of the viewport.

§

getTopForLineNumber(
    lineNumber: number,
    includeViewZones?: boolean,
): number

Get the vertical position (top offset) for the line's top w.r.t. to the first line.

§

getTopForPosition(
    lineNumber: number,
    column: number,
): number

Get the vertical position (top offset) for the position w.r.t. to the first line.

§

getValue(
    options?: {
        lineEnding: string;
        preserveBOM: boolean;
    },
): string

Get value of the current model attached to this editor.

§

getVisibleColumnFromPosition(position: IPosition): number

Given a position, returns a column number that takes tab-widths into account.

§

getVisibleRanges(): Range[]

Returns the ranges that are currently visible. Does not account for horizontal scrolling.

§

handleInitialized?(): void

Is called when the model has been set, view state was restored and options are updated. This is the best place to compute data for the viewport (such as tokens).

§

hasPendingScrollAnimation(): boolean

Check if the editor is currently scrolling towards a different scroll position.

§

hasTextFocus(): boolean

Returns true if the text inside this editor is focused (i.e. cursor is blinking).

§

hasWidgetFocus(): boolean

Returns true if the text inside this editor or an editor widget has focus.

§

layout(
    dimension?: IDimension,
    postponeRendering?: boolean,
): void

Instructs the editor to remeasure its container. This method should be called when the container of the editor gets resized.

If a dimension is passed in, the passed in value will be used.

By default, this will also render the editor immediately. If you prefer to delay rendering to the next animation frame, use postponeRendering == true.

§

layoutContentWidget(widget: IContentWidget): void

Layout/Reposition a content widget. This is a ping to the editor to call widget.getPosition() and update appropriately.

§

layoutGlyphMarginWidget(widget: IGlyphMarginWidget): void

Layout/Reposition a glyph margin widget. This is a ping to the editor to call widget.getPosition() and update appropriately.

§

layoutOverlayWidget(widget: IOverlayWidget): void

Layout/Reposition an overlay widget. This is a ping to the editor to call widget.getPosition() and update appropriately.

§

popUndoStop(): boolean

Remove the "undo stop" in the undo-redo stack.

§

pushUndoStop(): boolean

Create an "undo stop" in the undo-redo stack.

§

removeContentWidget(widget: IContentWidget): void

Remove a content widget.

§

removeDecorations(decorationIds: string[]): void

Remove previously added decorations.

§

removeGlyphMarginWidget(widget: IGlyphMarginWidget): void

Remove a glyph margin widget.

§

removeOverlayWidget(widget: IOverlayWidget): void

Remove an overlay widget.

§

render(forceRedraw?: boolean): void

Force an editor render now.

§

restoreViewState(state: ICodeEditorViewState): void

Restores the view state of the editor from a serializable object generated by saveViewState.

§

revealLine(
    lineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal a line.

§

revealLineInCenter(
    lineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal a line centered vertically.

§

revealLineInCenterIfOutsideViewport(
    lineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.

§

revealLineNearTop(
    lineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal a line close to the top of the viewport, optimized for viewing a code definition.

§

revealLines(
    startLineNumber: number,
    endLineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal lines.

§

revealLinesInCenter(
    lineNumber: number,
    endLineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal lines centered vertically.

§

revealLinesInCenterIfOutsideViewport(
    lineNumber: number,
    endLineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.

§

revealLinesNearTop(
    lineNumber: number,
    endLineNumber: number,
    scrollType?: ScrollType,
): void

Scroll vertically as necessary and reveal lines close to the top of the viewport, optimized for viewing a code definition.

§

revealPosition(
    position: IPosition,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a position.

§

revealPositionInCenter(
    position: IPosition,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a position centered vertically.

§

revealPositionInCenterIfOutsideViewport(
    position: IPosition,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.

§

revealPositionNearTop(
    position: IPosition,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport, optimized for viewing a code definition.

§

revealRange(range: IRange, scrollType?: ScrollType): void

Scroll vertically or horizontally as necessary and reveal a range.

§

revealRangeAtTop(
    range: IRange,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.

§

revealRangeInCenter(
    range: IRange,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a range centered vertically.

§

revealRangeInCenterIfOutsideViewport(
    range: IRange,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.

§

revealRangeNearTop(
    range: IRange,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport, optimized for viewing a code definition.

§

revealRangeNearTopIfOutsideViewport(
    range: IRange,
    scrollType?: ScrollType,
): void

Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport, optimized for viewing a code definition. Only if it lies outside the viewport.

§

saveViewState(): ICodeEditorViewState

Saves current view state of the editor in a serializable object.

§

setBanner(bannerDomNode: HTMLElement, height: number): void

§

setModel(model: ITextModel): void

Sets the current model attached to this editor. If the previous model was created by the editor via the value key in the options literal object, it will be destroyed. Otherwise, if the previous model was set via setModel, or the model key in the options literal object, the previous model will not be destroyed. It is safe to call setModel(null) to simply detach the current model from the editor.

§

setPosition(position: IPosition, source?: string): void

Set the primary position of the cursor. This will remove any secondary cursors.

§

setScrollLeft(
    newScrollLeft: number,
    scrollType?: ScrollType,
): void

Change the scrollLeft of the editor's viewport.

§

setScrollPosition(
    position: INewScrollPosition,
    scrollType?: ScrollType,
): void

Change the scroll position of the editor's viewport.

§

setScrollTop(
    newScrollTop: number,
    scrollType?: ScrollType,
): void

Change the scrollTop of the editor's viewport.

§

setSelection(selection: IRange, source?: string): void

Set the primary selection of the editor. This will remove any secondary cursors.

§

setSelection(selection: Range, source?: string): void

Set the primary selection of the editor. This will remove any secondary cursors.

§

setSelection(selection: ISelection, source?: string): void

Set the primary selection of the editor. This will remove any secondary cursors.

§

setSelection(selection: Selection, source?: string): void

Set the primary selection of the editor. This will remove any secondary cursors.

§

setSelections(
    selections: readonly ISelection[],
    source?: string,
): void

Set the selections for all the cursors of the editor. Cursors will be removed or added, as necessary.

§

setValue(newValue: string): void

Set the value of the current model attached to this editor.

§

trigger(
    source: string,
    handlerId: string,
    payload: unknown,
): void

Directly trigger a handler or an editor action.

§

updateOptions(
    newOptions: IEditorOptions & IGlobalEditorOptions,
): void

Update the editor's options after the editor has been created.

§

writeScreenReaderContent(reason: string): void

Write the screen reader content to be the current selection

Events§

§readonly onContextMenu: IEvent<IEditorMouseEvent>

An event emitted on a "contextmenu".

§readonly onDidAttemptReadOnlyEdit: IEvent<void>

An event emitted when editing failed because the editor is read-only.

§readonly onDidBlurEditorText: IEvent<void>

An event emitted when the text inside this editor lost focus (i.e. cursor stops blinking).

§readonly onDidBlurEditorWidget: IEvent<void>

An event emitted when the text inside this editor or an editor widget lost focus.

§readonly onDidChangeConfiguration: IEvent<ConfigurationChangedEvent>

An event emitted when the configuration of the editor has changed. (e.g. editor.updateOptions())

§readonly onDidChangeCursorPosition: IEvent<ICursorPositionChangedEvent>

An event emitted when the cursor position has changed.

§readonly onDidChangeCursorSelection: IEvent<ICursorSelectionChangedEvent>

An event emitted when the cursor selection has changed.

§readonly onDidChangeHiddenAreas: IEvent<void>

An event emitted when hidden areas change in the editor (e.g. due to folding).

§readonly onDidChangeModel: IEvent<IModelChangedEvent>

An event emitted when the model of this editor has changed (e.g. editor.setModel()).

§readonly onDidChangeModelContent: IEvent<IModelContentChangedEvent>

An event emitted when the content of the current model has changed.

§readonly onDidChangeModelDecorations: IEvent<IModelDecorationsChangedEvent>

An event emitted when the decorations of the current model have changed.

§readonly onDidChangeModelLanguage: IEvent<IModelLanguageChangedEvent>

An event emitted when the language of the current model has changed.

§readonly onDidChangeModelLanguageConfiguration: IEvent<IModelLanguageConfigurationChangedEvent>

An event emitted when the language configuration of the current model has changed.

§readonly onDidChangeModelOptions: IEvent<IModelOptionsChangedEvent>

An event emitted when the options of the current model has changed.

§readonly onDidContentSizeChange: IEvent<IContentSizeChangedEvent>

An event emitted when the content width or content height in the editor has changed.

§readonly onDidFocusEditorText: IEvent<void>

An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).

§readonly onDidFocusEditorWidget: IEvent<void>

An event emitted when the text inside this editor or an editor widget gained focus.

§readonly onDidLayoutChange: IEvent<EditorLayoutInfo>

An event emitted when the layout of the editor has changed.

§readonly onDidPaste: IEvent<IPasteEvent>

An event emitted when users paste text in the editor.

§readonly onDidScrollChange: IEvent<IScrollEvent>

An event emitted when the scroll in the editor has changed.

§readonly onKeyDown: IEvent<IKeyboardEvent>

An event emitted on a "keydown".

§readonly onKeyUp: IEvent<IKeyboardEvent>

An event emitted on a "keyup".

§readonly onMouseDown: IEvent<IEditorMouseEvent>

An event emitted on a "mousedown".

§readonly onMouseLeave: IEvent<IPartialEditorMouseEvent>

An event emitted on a "mouseleave".

§readonly onMouseMove: IEvent<IEditorMouseEvent>

An event emitted on a "mousemove".

§readonly onMouseUp: IEvent<IEditorMouseEvent>

An event emitted on a "mouseup".

§readonly onWillChangeModel: IEvent<IModelChangedEvent>

An event emitted when the model of this editor is about to change (e.g. from editor.setModel()).

§

onDidDispose(listener: () => void): IDisposable

An event emitted when the editor has been disposed.