Trilium Frontend API
    Preparing search index...

    Interface ModelAttributeProperties

    A structure containing additional metadata describing the attribute.

    See module:engine/model/schema~ModelSchema#setAttributeProperties Schema#setAttributeProperties() for usage examples.

    interface ModelAttributeProperties {
        blockAlignment?:
            | ModelBlockAlignmentAttributesMapping
            | ((element: ModelElement) => ModelBlockAlignmentAttributesMapping);
        copyFromObject?: boolean;
        copyOnEnter?: boolean;
        copyOnReplace?: boolean;
        isFormatting?: boolean;
        [name: string]: unknown;
    }

    Indexable

    • [name: string]: unknown
    Index

    Properties

    Defines the mapping of all possible block alignments for a specific model element. It is used by features that need to determine whether an element can be aligned, and apply the alignment if possible.

    copyFromObject?: boolean

    Indicates that given text attribute should be copied from an inline object to the next inserted inline content.

    true
    
    copyOnEnter?: boolean

    Indicates that given text attribute should be copied to the next block when enter is pressed.

    copyOnReplace?: boolean

    Indicates that given attribute should be preserved while replacing the element.

    isFormatting?: boolean

    Indicates that the attribute should be considered as a visual formatting, like bold, italic or fontSize rather than semantic attribute (such as src, listType, etc.). For example, it is used by the "Remove format" feature.