A mounted CodeMirror editor handle. The dialog reads the live value at Save time via getValue, focuses it after the popup is shown, and destroys it on close.

interface MountedExpressionEditor {
    destroy(): void;
    focus(): void;
    getValue(): string;
    insertText(text: string): void;
    setValue(text: string): void;
}

Methods

  • Insert text at the caret (replacing any selection) and re-focus. For a helper call like abs() the caret lands between the parentheses.

    Parameters

    • text: string

      The text to insert.

    Returns void

  • Replace the entire editor text (fires the change handler). Used by tests to set content deterministically without simulating keystrokes.

    Parameters

    • text: string

      The new editor text.

    Returns void