Interface

Consumables (engine/conversion)

@ckeditor/ckeditor5-engine/src/conversion/viewconsumable

interface

Object describing all features of a view element that could be consumed and converted individually. This is a non-normalized form of NormalizedConsumables 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 NormalizedConsumables using the normalizeConsumables helper.

Filtering

Properties

  • attributes : string | Array<string> | undefined

    Attribute name or array of attribute names.

  • classes : string | Array<string> | undefined

    Class name or array of class names.

  • 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.

  • styles : string | Array<string> | undefined

    Style name or array of style names.