interface EditorActions {
    appendText: ((text) => void);
    clearUndoHistory?: (() => void);
    focus: (() => void);
    getContent: (() => string);
    insertImage?: ((url, attrs?) => void);
    isDisposed: (() => boolean);
    setContent: ((content, triggerAutoSave?) => void);
}

Properties

appendText: ((text) => void)

Type declaration

    • (text): void
    • Parameters

      • text: string

      Returns void

clearUndoHistory?: (() => void)

Type declaration

    • (): void
    • Returns void

focus: (() => void)

Type declaration

    • (): void
    • Returns void

getContent: (() => string)

Type declaration

    • (): string
    • Returns string

insertImage?: ((url, attrs?) => void)

Type declaration

    • (url, attrs?): void
    • Parameters

      • url: string
      • Optional attrs: {
            [key: string]: string;
        }
        • [key: string]: string

      Returns void

isDisposed: (() => boolean)

Tells if Editor is unmounted

Type declaration

    • (): boolean
    • Returns boolean

setContent: ((content, triggerAutoSave?) => void)

Type declaration

    • (content, triggerAutoSave?): void
    • Parameters

      • content: string
      • Optional triggerAutoSave: boolean

      Returns void