Trilium Frontend API
    Preparing search index...

    Interface Consumables

    Object describing all features of a view element that could be consumed and converted individually. This is a non-normalized form of module:engine/view/element~ViewNormalizedConsumables generated from the view Element.

    Example element:

    <a class="foo bar" style="color: red; margin: 5px" href="https://ckeditor.com" rel="nofollow noreferrer" target="_blank">
    

    The Consumables would include:

    {
    name: true,
    classes: [ "foo", "bar" ],
    styles: [ "color", "margin" ]
    }

    You could convert a Consumable into a module:engine/view/element~ViewNormalizedConsumables using the module:engine/conversion/viewconsumable~normalizeConsumables helper.

    interface Consumables {
        attributes?: string | string[];
        classes?: string | string[];
        name?: boolean;
        styles?: string | string[];
    }
    Index

    Properties

    attributes?: string | string[]

    Attribute name or array of attribute names.

    classes?: string | string[]

    Class name or array of class names.

    name?: boolean

    If set to true element's name will be included in a consumable. Depending on the usage context it would be added as consumable, tested for being available for consume or consumed.

    styles?: string | string[]

    Style name or array of style names.