Interface

NormalizedConsumables (engine/view)

@ckeditor/ckeditor5-engine/src/view/element

interface

Object describing all features of a view element that could be consumed and converted individually. This is a normalized form of Consumables 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 NormalizedConsumables would include:

{
	name: true,
	attributes: [
		[ "class", "foo" ],
		[ "class", "bar" ],
		[ "style", "color" ],
		[ "style", "margin-top" ],
		[ "style", "margin-right" ],
		[ "style", "margin-bottom" ],
		[ "style", "margin-left" ],
	[ "style", "margin" ],
		[ "href" ],
		[ "rel", "nofollow" ],
		[ "rel", "noreferrer" ],
		[ "target" ]
	]
}

Filtering

Properties

  • attributes : Array<tuple>

    Array of tuples - an attribute name, and optional token for tokenized attributes. Note that there could be multiple entries for the same attribute with different tokens (class names or style properties).

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