Consumables
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">
The Consumables
would include:
{
name: true,
classes: [ "foo", "bar" ],
styles: [ "color", "margin" ]
}
You could convert a Consumable
into a ViewNormalizedConsumables
using the normalizeConsumables
helper.
Properties
-
attributes : string | Array<string> | undefined
module:engine/conversion/viewconsumable~Consumables#attributes
Attribute name or array of attribute names.
-
classes : string | Array<string> | undefined
module:engine/conversion/viewconsumable~Consumables#classes
Class name or array of class names.
-
name : boolean | undefined
module:engine/conversion/viewconsumable~Consumables#name
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
module:engine/conversion/viewconsumable~Consumables#styles
Style name or array of style names.