ElementAttributeValue (engine/view)
@ckeditor/ckeditor5-engine/src/view/element
Filtering
Properties
-
Returns
trueif attribute has no value set. -
Number of tokens (styles, classes or other tokens) defined.
Methods
-
_canMergeFrom( other ) → booleanmodule:engine/view/element~ElementAttributeValue#_canMergeFromUsed by
_canMergeAttributesFromto verify if the given attribute can be merged without conflicts into the attribute.This method is indirectly used by the
DowncastWriterwhile down-casting anAttributeElementto merge it with other AttributeElement.Parameters
other : this
Returns
boolean
-
_clone() → thismodule:engine/view/element~ElementAttributeValue#_clone -
_getConsumables( [ name ] ) → Array<string>module:engine/view/element~ElementAttributeValue#_getConsumablesReturns a list of consumables for the attribute. This includes related tokens (for example other forms of notation of the same style property).
Could be filtered by the given token name (class name, style property, etc.).
Parameters
[ name ] : string
Returns
Array<string>
-
_getTokensMatch( tokenPattern, [ valuePattern ] ) → undefined | Array<string>module:engine/view/element~ElementAttributeValue#_getTokensMatchUsed by the Matcher to collect matching attribute tokens.
Parameters
tokenPattern : string | true | RegExpThe matched token name pattern.
[ valuePattern ] : string | true | RegExpThe matched token value pattern.
Returns
undefined | Array<string>An array of matching tokens.
-
_isMatching( other ) → booleanmodule:engine/view/element~ElementAttributeValue#_isMatchingUsed by
_canSubtractAttributesOfto verify if the given attribute can be fully subtracted from the attribute.This method is indirectly used by the
DowncastWriterwhile down-casting anAttributeElementto unwrap the AttributeElement.Parameters
other : this
Returns
boolean
-
_mergeFrom( other ) → voidmodule:engine/view/element~ElementAttributeValue#_mergeFromUsed by
_mergeAttributesFromto merge a given attribute into the attribute.This method is indirectly used by the
DowncastWriterwhile down-casting anAttributeElementto merge it with other AttributeElement.Parameters
other : this
Returns
void
-
clear() → voidmodule:engine/view/element~ElementAttributeValue#clear -
has( name ) → booleanmodule:engine/view/element~ElementAttributeValue#hasChecks if a given token (style, class, token) is set.
Parameters
name : string
Returns
boolean
-
isSimilar( other ) → booleanmodule:engine/view/element~ElementAttributeValue#isSimilarReturns
trueif both attributes have the same content.Parameters
other : this
Returns
boolean
-
keys() → Array<string>module:engine/view/element~ElementAttributeValue#keys -
remove( tokens ) → voidmodule:engine/view/element~ElementAttributeValue#removeRemoves given token (style, class, other token).
Parameters
tokens : ArrayOrItem<string>
Returns
void
-
set( stylesOrTokens ) → voidmodule:engine/view/element~ElementAttributeValue#setSets a given token (for style also a record of properties).
Parameters
stylesOrTokens : ArrayOrItem<string> | Styles
Returns
void
-
set( name, value ) → voidmodule:engine/view/element~ElementAttributeValue#set -
setTo( value ) → thismodule:engine/view/element~ElementAttributeValue#setTo -
toString() → stringmodule:engine/view/element~ElementAttributeValue#toString
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.