Theia API Documentation v1.66.0
    Preparing search index...

    Interface TextEditorEdit

    interface TextEditorEdit {
        delete(location: Range | Selection): void;
        insert(location: Position, value: string): void;
        replace(location: Position | Range | Selection, value: string): void;
        setEndOfLine(endOfLine: EndOfLine): void;
    }
    Index

    Methods

    • Insert text at a location. You can use \r\n or \n in value and they will be normalized to the current document. Although the equivalent text edit can be made with replace, insert will produce a different resulting selection (it will get moved).

      Parameters

      • location: Position

        The position where the new text should be inserted.

      • value: string

        The new text this operation should insert.

      Returns void