Trilium Frontend API
    Preparing search index...

    Type Alias ModelNodeSet

    ModelNodeSet:
        | ModelItem
        | string
        | ModelNodeList
        | ModelDocumentFragment
        | Iterable<ModelItem | string | ModelNodeList | ModelDocumentFragment>

    Value that can be normalized to an array of module:engine/model/node~ModelNode nodes.

    Non-arrays are normalized as follows:

    • module:engine/model/node~ModelNode Node is left as is,
    • module:engine/model/textproxy~ModelTextProxy TextProxy and string are normalized to module:engine/model/text~ModelText Text,
    • module:engine/model/nodelist~ModelNodeList NodeList is normalized to an array containing all nodes that are in that node list,
    • module:engine/model/documentfragment~ModelDocumentFragment ModelDocumentFragment is normalized to an array containing all of it's children.

    Arrays are processed item by item like non-array values and flattened to one array. Normalization always results in a flat array of module:engine/model/node~ModelNode nodes. Consecutive text nodes (or items normalized to text nodes) will be merged if they have same attributes.