Trilium Frontend API
    Preparing search index...

    Interface CompletionSection

    Object used to describe a completion section. It is recommended to create a shared object used by all the completions in a given section.

    interface CompletionSection {
        header?: (section: CompletionSection) => HTMLElement;
        name: string;
        rank?: number | "dynamic";
    }
    Index

    Properties

    Properties

    header?: (section: CompletionSection) => HTMLElement

    An optional function that renders the section header. Since the headers are shown inside a list, you should make sure the resulting element has a display: list-item style.

    name: string

    The name of the section. If no render method is present, this will be displayed above the options.

    rank?: number | "dynamic"

    By default, sections are ordered alphabetically by name. To specify an explicit order, rank can be used. Sections with a lower rank will be shown above sections with a higher rank.

    When set to "dynamic", the section's position compared to other dynamic sections depends on the matching score of the best-matching option in the sections.