A method to prevent the upcast of the src-attribute of an image.
The src attribute for CoreMedia Images is not stored as a URL but as a
reference to a content property in a xlink:href attribute. In this case, it
does not make sense to work with src-attributes in the model and side
effects of an existing src-attribute (like GHS) have to be prevented.
Preventing the src attribute to become part of the model means to consume
the attribute.
Unfortunately, CKEditor 5 does not check if the attribute has already been
consumed:
the src attribute will be upcast if the src attribute exists as view
attribute. To fully prevent the upcast, we have to consume the attribute and
remove the src from the view node.
A method to prevent the upcast of the src-attribute of an image.
The
src
attribute for CoreMedia Images is not stored as a URL but as a reference to a content property in axlink:href
attribute. In this case, it does not make sense to work withsrc
-attributes in the model and side effects of an existingsrc
-attribute (like GHS) have to be prevented.Preventing the
src
attribute to become part of the model means to consume the attribute.Unfortunately, CKEditor 5 does not check if the attribute has already been consumed:
Combined with:
src
attributethe
src
attribute will be upcast if thesrc
attribute exists as view attribute. To fully prevent the upcast, we have to consume the attribute and remove thesrc
from the view node.