Trilium Frontend API
    Preparing search index...

    Class BlockInfo

    Record used to represent information about a block-level element in the editor view.

    Index

    Constructors

    Properties

    from: number

    The start of the element in the document.

    height: number

    Its height.

    length: number

    The length of the element.

    top: number

    The top position of the element (relative to the top of the document).

    Accessors

    • get bottom(): number

      The bottom position of the element.

      Returns number

    • get to(): number

      The end of the element as a document position.

      Returns number

    • get type(): BlockType | readonly BlockInfo[]

      The type of element this is. When querying lines, this may be an array of all the blocks that make up the line.

      Returns BlockType | readonly BlockInfo[]

    • get widget(): WidgetType

      If this is a widget block, this will return the widget associated with it.

      Returns WidgetType

    • get widgetLineBreaks(): number

      If this is a textblock, this holds the number of line breaks that appear in widgets inside the block.

      Returns number