Trilium Frontend API
    Preparing search index...

    Interface ElementApi

    Interface describing an editor that replaced a DOM element (was "initialized on an element").

    Such an editor should provide a method to module:core/editor/utils/elementapimixin~ElementApi#updateSourceElement update the replaced element with the current data.

    interface ElementApi {
        sourceElement: HTMLElement;
        updateSourceElement(data?: string): void;
    }
    Index
    sourceElement: HTMLElement

    The element on which the editor has been initialized.

    • Updates the #sourceElement editor source element's content with the data if the module:core/editor/editorconfig~EditorConfig#updateSourceElementOnDestroy updateSourceElementOnDestroy configuration option is set to true.

      Parameters

      • Optionaldata: string

        Data that the #sourceElement editor source element should be updated with.

      Returns void