Trilium Frontend API
    Preparing search index...

    Interface PluginSpec<V>

    Provides additional information when defining a view plugin.

    interface PluginSpec<V extends PluginValue> {
        decorations?: (value: V) => DecorationSet;
        eventHandlers?: DOMEventHandlers<V>;
        eventObservers?: DOMEventHandlers<V>;
        provide?: (plugin: ViewPlugin<V, any>) => Extension;
    }

    Type Parameters

    Index

    Properties

    decorations?: (value: V) => DecorationSet

    Allow the plugin to provide decorations. When given, this should be a function that take the plugin value and return a decoration set. See also the caveat about layout-changing decorations that depend on the view.

    eventHandlers?: DOMEventHandlers<V>

    Register the given event handlers for the plugin. When called, these will have their this bound to the plugin value.

    eventObservers?: DOMEventHandlers<V>

    Registers event observers for the plugin. Will, when called, have their this bound to the plugin value.

    provide?: (plugin: ViewPlugin<V, any>) => Extension

    Specify that the plugin provides additional extensions when added to an editor configuration.