Trilium Frontend API
    Preparing search index...

    Class StateEffect<Value>

    State effects can be used to represent additional effects associated with a transaction. They are often useful to model changes to custom state fields, when those changes aren't implicit in document or selection changes.

    Type Parameters

    • Value
    Index

    Constructors

    Properties

    value: Value

    The value of this effect.

    appendConfig: StateEffectType<Extension>

    Append extensions to the top-level configuration of the editor.

    This effect can be used to reconfigure the root extensions of the editor. Doing this will discard any extensions appended, but does not reset the content of reconfigured compartments.

    Methods

    • Map this effect through a position mapping. Will return undefined when that ends up deleting the effect.

      Parameters

      Returns StateEffect<Value>

    • Map an array of effects through a change set.

      Parameters

      Returns readonly StateEffect<any>[]