ElementAttributeValue (engine/view)
@ckeditor/ckeditor5-engine/src/view/element
Filtering
Properties
-
Returns
true
if attribute has no value set. -
Number of tokens (styles, classes or other tokens) defined.
Methods
-
_canMergeFrom( other ) → boolean
module:engine/view/element~ElementAttributeValue#_canMergeFrom
Used by
_canMergeAttributesFrom
to verify if the given attribute can be merged without conflicts into the attribute.This method is indirectly used by the
DowncastWriter
while down-casting anAttributeElement
to merge it with other AttributeElement.Parameters
other : ElementAttributeValue
Returns
boolean
-
_clone() → ElementAttributeValue
module:engine/view/element~ElementAttributeValue#_clone
-
_getConsumables( [ name ] ) → Array<string>
module:engine/view/element~ElementAttributeValue#_getConsumables
Returns 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#_getTokensMatch
Used by the Matcher to collect matching attribute tokens.
Parameters
tokenPattern : string | true | RegExp
The matched token name pattern.
[ valuePattern ] : string | true | RegExp
The matched token value pattern.
Returns
undefined | Array<string>
An array of matching tokens.
-
_isMatching( other ) → boolean
module:engine/view/element~ElementAttributeValue#_isMatching
Used by
_canSubtractAttributesOf
to verify if the given attribute can be fully subtracted from the attribute.This method is indirectly used by the
DowncastWriter
while down-casting anAttributeElement
to unwrap the AttributeElement.Parameters
other : ElementAttributeValue
Returns
boolean
-
_mergeFrom( other ) → void
module:engine/view/element~ElementAttributeValue#_mergeFrom
Used by
_mergeAttributesFrom
to merge a given attribute into the attribute.This method is indirectly used by the
DowncastWriter
while down-casting anAttributeElement
to merge it with other AttributeElement.Parameters
other : ElementAttributeValue
Returns
void
-
clear() → void
module:engine/view/element~ElementAttributeValue#clear
-
has( name ) → boolean
module:engine/view/element~ElementAttributeValue#has
Checks if a given token (style, class, token) is set.
Parameters
name : string
Returns
boolean
-
isSimilar( other ) → boolean
module:engine/view/element~ElementAttributeValue#isSimilar
Returns
true
if both attributes have the same content.Parameters
other : ElementAttributeValue
Returns
boolean
-
keys() → Array<string>
module:engine/view/element~ElementAttributeValue#keys
-
remove( tokens ) → void
module:engine/view/element~ElementAttributeValue#remove
Removes given token (style, class, other token).
Parameters
tokens : ArrayOrItem<string>
Returns
void
-
set( stylesOrTokens ) → void
module:engine/view/element~ElementAttributeValue#set
Sets a given token (for style also a record of properties).
Parameters
stylesOrTokens : ArrayOrItem<string> | Styles
Returns
void
-
set( name, value ) → void
module:engine/view/element~ElementAttributeValue#set
-
setTo( value ) → ElementAttributeValue
module:engine/view/element~ElementAttributeValue#setTo
Resets the value to the given one.
Parameters
value : string
Returns
-
toString() → string
module: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.