Trilium Frontend API
    Preparing search index...

    Interface ModelTreeWalkerValue

    Object returned by module:engine/model/treewalker~ModelTreeWalker when traversing tree model.

    interface ModelTreeWalkerValue {
        item: ModelItem;
        length?: number;
        nextPosition: ModelPosition;
        previousPosition: ModelPosition;
        type: ModelTreeWalkerValueType;
    }
    Index

    Properties

    item: ModelItem

    Item between old and new positions of module:engine/model/treewalker~ModelTreeWalker.

    length?: number

    Length of the item. For 'elementStart' it is 1. For 'text' it is the length of the text. For 'elementEnd' it is undefined.

    nextPosition: ModelPosition

    Next position of the iterator.

    • Forward iteration: For 'elementStart' it is the first position inside the element. For all other types it is the position after the item.
    • Backward iteration: For 'elementEnd' it is last position inside element. For all other types it is the position before the item.
    previousPosition: ModelPosition

    Previous position of the iterator.

    • Forward iteration: For 'elementEnd' it is the last position inside the element. For all other types it is the position before the item.
    • Backward iteration: For 'elementStart' it is the first position inside the element. For all other types it is the position after item.