Trilium Frontend API
    Preparing search index...

    Interface MarkDecorationSpec

    interface MarkDecorationSpec {
        attributes?: { [key: string]: string };
        bidiIsolate?: Direction;
        class?: string;
        inclusive?: boolean;
        inclusiveEnd?: boolean;
        inclusiveStart?: boolean;
        tagName?: string;
        [other: string]: any;
    }

    Indexable

    • [other: string]: any

      Decoration specs allow extra properties, which can be retrieved through the decoration's spec property.

    Index

    Properties

    attributes?: { [key: string]: string }

    Add attributes to the DOM elements that hold the text in the marked range.

    bidiIsolate?: Direction

    When using sets of decorations in bidiIsolatedRanges, this property provides the direction of the isolates. When null or not given, it indicates the range has dir=auto, and its direction should be derived from the first strong directional character in it.

    class?: string

    Shorthand for {attributes: {class: value}}.

    inclusive?: boolean

    Whether the mark covers its start and end position or not. This influences whether content inserted at those positions becomes part of the mark. Defaults to false.

    inclusiveEnd?: boolean

    Whether the end should be inclusive.

    inclusiveStart?: boolean

    Specify whether the start position of the marked range should be inclusive. Overrides inclusive, when both are present.

    tagName?: string

    Add a wrapping element around the text in the marked range. Note that there will not necessarily be a single element covering the entire range—other decorations with lower precedence might split this one if they partially overlap it, and line breaks always end decoration elements.