Trilium Frontend API
    Preparing search index...

    Interface PluginValue

    This is the interface plugin objects conform to.

    interface PluginValue {
        constructor: Function;
        destroy?(): void;
        docViewUpdate?(view: EditorView): void;
        hasOwnProperty(v: PropertyKey): boolean;
        isPrototypeOf(v: Object): boolean;
        propertyIsEnumerable(v: PropertyKey): boolean;
        toLocaleString(): string;
        toString(): string;
        update?(update: ViewUpdate): void;
        valueOf(): Object;
    }

    Hierarchy (View Summary)

    Index

    Properties

    constructor: Function

    The initial value of Object.prototype.constructor is the standard built-in Object constructor.

    Methods

    • Called when the plugin is no longer going to be used. Should revert any changes the plugin made to the DOM.

      Returns void

    • Called when the document view is updated (due to content, decoration, or viewport changes). Should not try to immediately start another view update. Often useful for calling requestMeasure.

      Parameters

      Returns void

    • Determines whether an object has a property with the specified name.

      Parameters

      Returns boolean

    • Determines whether an object exists in another object's prototype chain.

      Parameters

      • v: Object

        Another object whose prototype chain is to be checked.

      Returns boolean

    • Determines whether a specified property is enumerable.

      Parameters

      Returns boolean

    • Returns a date converted to a string using the current locale.

      Returns string

    • Returns a string representation of an object.

      Returns string

    • Notifies the plugin of an update that happened in the view. This is called before the view updates its own DOM. It is responsible for updating the plugin's internal state (including any state that may be read by plugin fields) and writing to the DOM for the changes in the update. To avoid unnecessary layout recomputations, it should not read the DOM layout—use requestMeasure to schedule your code in a DOM reading phase if you need to.

      Parameters

      Returns void

    • Returns the primitive value of the specified object.

      Returns Object