Sign up (with export icon)

Consumables

Api-interface icon interface

Object describing all features of a view element that could be consumed and converted individually. This is a non-normalized form of 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">
Copy code

The Consumables would include:

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

You could convert a Consumable into a ViewNormalizedConsumables using the normalizeConsumables helper.

Properties

  • Chevron-right icon

    attributes : string | Array<string> | undefined

    Attribute name or array of attribute names.

  • Chevron-right icon

    classes : string | Array<string> | undefined

    Class name or array of class names.

  • Chevron-right icon

    name : boolean | undefined

    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.

  • Chevron-right icon

    styles : string | Array<string> | undefined

    Style name or array of style names.