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

    Event triggered by extensions to signal that an edit has occurred on an CustomDocument.

    interface CustomDocumentEditEvent<T extends CustomDocument = CustomDocument> {
        document: T;
        label?: string;
        redo(): void | Thenable<void>;
        undo(): void | Thenable<void>;
    }

    Type Parameters

    Index

    Properties

    Methods

    Properties

    document: T

    The document that the edit is for.

    label?: string

    Display name describing the edit.

    This will be shown to users in the UI for undo/redo operations.

    Methods

    • Redo the edit operation.

      This is invoked by Theia when the user redoes this edit. To implement redo, your extension should restore the document and editor to the state they were in just after this edit was added to Theia's internal edit stack by onDidChangeCustomDocument.

      Returns void | Thenable<void>

    • Undo the edit operation.

      This is invoked by Theia when the user undoes this edit. To implement undo, your extension should restore the document and editor to the state they were in just before this edit was added to Theia's internal edit stack by onDidChangeCustomDocument.

      Returns void | Thenable<void>