Interface TextEditor

interface TextEditor {
    cursor: Position;
    document: TextEditorDocument;
    isReadonly: boolean | MarkdownString;
    node: HTMLElement;
    onCursorPositionChanged: Event<Position>;
    onDidChangeReadOnly: Event<boolean | MarkdownString>;
    onDocumentContentChanged: Event<TextDocumentChangeEvent>;
    onEncodingChanged: Event<string>;
    onFocusChanged: Event<boolean>;
    onLanguageChanged: Event<string>;
    onMouseDown: Event<EditorMouseEvent>;
    onScrollChanged: Event<void>;
    onSelectionChanged: Event<Selection>;
    selection: Selection;
    uri: URI;
    blur(): void;
    deltaDecorations(params): string[];
    detectLanguage(): void;
    executeEdits(edits): boolean;
    focus(): void;
    getEncoding(): string;
    getLinesDecorations(startLineNumber, endLineNumber): EditorDecoration[];
    getVisibleColumn(position): number;
    getVisibleRanges(): Range[];
    isFocused(): boolean;
    refresh(): void;
    replaceText(params): Promise<boolean>;
    resizeToFit(): void;
    restoreViewState(state): void;
    revealPosition(position, options?): void;
    revealRange(range, options?): void;
    setEncoding(encoding, mode): void;
    setLanguage(languageId): void;
    setSize(size): void;
    shouldDisplayDirtyDiff(): boolean;
    storeViewState(): object;
}

Hierarchy (view full)

Properties

cursor: Position
isReadonly: boolean | MarkdownString
node: HTMLElement
onCursorPositionChanged: Event<Position>
onDidChangeReadOnly: Event<boolean | MarkdownString>
onDocumentContentChanged: Event<TextDocumentChangeEvent>
onEncodingChanged: Event<string>
onFocusChanged: Event<boolean>
onLanguageChanged: Event<string>
onMouseDown: Event<EditorMouseEvent>
onScrollChanged: Event<void>
onSelectionChanged: Event<Selection>
selection: Selection
uri: URI

Methods

  • Gets all the decorations for the lines between startLineNumber and endLineNumber as an array.

    Parameters

    • startLineNumber: number

      The start line number.

    • endLineNumber: number

      The end line number.

    Returns EditorDecoration[]

    An array with the decorations.