Report an issue
Class

AutomaticDecorators (link)

@ckeditor/ckeditor5-link/src/utils

class

Helper class that ties together all LinkDecoratorAutomaticDefinition and provides a downcast dispatcher for them.

Filtering

Properties

  • length : Number

    protected readonly

    Gives information about the number of decorators stored in the AutomaticDecorators instance.

  • _definitions : Set

    private

    Stores the definition of automatic decorators. This data is used as a source for a downcast dispatcher to create a proper conversion to output data.

Methods

  • add( item )

    Adds automatic decorator objects or an array with them to be used during downcasting.

    Parameters

    item : LinkDecoratorAutomaticDefinition | Array.<LinkDecoratorAutomaticDefinition>

    A configuration object of automatic rules for decorating links. It might also be an array of such objects.

  • getDispatcher() → function

    Provides the conversion helper used in the add method.

    Returns

    function

    A dispatcher function used as conversion helper in add.