interface EditorEvents {
    beforeEndOperation: (e: any) => void;
    blur: (e: any) => void;
    change: (delta: Delta) => void;
    changeMode: (e: { mode?: SyntaxMode; oldMode?: SyntaxMode }) => void;
    changeSelection: () => void;
    changeSelectionStyle: (
        data: "fullLine" | "screenLine" | "text" | "line",
    ) => void;
    changeSession: (
        e: { oldSession: EditSession; session: EditSession },
    ) => void;
    changeStatus: (e: any) => void;
    codeLensClick: (e: any) => void;
    compositionStart: () => void;
    copy: (e: { text: string }) => void;
    destroy: (e: any) => void;
    findSearchBox: (e: { match: boolean }) => void;
    focus: (e?: any) => void;
    gutterclick: (e: MouseEvent) => void;
    gutterkeydown: (e: GutterKeyboardEvent) => void;
    hideGutterTooltip: (e: GutterTooltip) => void;
    input: () => void;
    keyboardActivity: (e: any) => void;
    mousedown: (e: MouseEvent) => void;
    mousemove: (e: MouseEvent & { scrollTop?: any }, editor?: Editor) => void;
    mouseup: (e: MouseEvent) => void;
    mousewheel: (e: MouseEvent) => void;
    nativecontextmenu: (e: any) => void;
    paste: (e: { event?: ClipboardEvent; text: string }) => void;
    select: () => void;
    showGutterTooltip: (e: GutterTooltip) => void;
}

Properties

beforeEndOperation: (e: any) => void
blur: (e: any) => void
change: (delta: Delta) => void
changeMode: (e: { mode?: SyntaxMode; oldMode?: SyntaxMode }) => void
changeSelection: () => void
changeSelectionStyle: (
    data: "fullLine" | "screenLine" | "text" | "line",
) => void

Emitted when the selection style changes, via [[Editor.setSelectionStyle]].

Type declaration

    • (data: "fullLine" | "screenLine" | "text" | "line"): void
    • Parameters

      • data: "fullLine" | "screenLine" | "text" | "line"

        Contains one property, data, which indicates the new selection style

      Returns void

changeSession: (e: { oldSession: EditSession; session: EditSession }) => void

Emitted whenever the [[EditSession]] changes.

Type declaration

    • (e: { oldSession: EditSession; session: EditSession }): void
    • Parameters

      • e: { oldSession: EditSession; session: EditSession }

        An object with two properties, oldSession and session, that represent the old and new [[EditSession]]s.

      Returns void

changeStatus: (e: any) => void
codeLensClick: (e: any) => void
compositionStart: () => void
copy: (e: { text: string }) => void

Emitted when text is copied.

destroy: (e: any) => void
findSearchBox: (e: { match: boolean }) => void
focus: (e?: any) => void
gutterclick: (e: MouseEvent) => void
gutterkeydown: (e: GutterKeyboardEvent) => void
hideGutterTooltip: (e: GutterTooltip) => void
input: () => void
keyboardActivity: (e: any) => void
mousedown: (e: MouseEvent) => void
mousemove: (e: MouseEvent & { scrollTop?: any }, editor?: Editor) => void
mouseup: (e: MouseEvent) => void
mousewheel: (e: MouseEvent) => void
nativecontextmenu: (e: any) => void
paste: (e: { event?: ClipboardEvent; text: string }) => void

Emitted when text is pasted.

select: () => void
showGutterTooltip: (e: GutterTooltip) => void