image/image/converters
@ckeditor/ckeditor5-image/src/image/converters
Filtering
Functions
-
downcastImageAttribute( imageUtils, imageType, attributeKey ) → function
module:image/image/converters~downcastImageAttribute
protected
Converter used to convert a given image attribute from the model to the view.
Parameters
imageUtils : ImageUtils
imageType : 'imageBlock' | 'imageInline'
The type of the image.
attributeKey : String
The name of the attribute to convert.
Returns
function
-
downcastSourcesAttribute( imageUtils ) → function
module:image/image/converters~downcastSourcesAttribute
protected
Converts the
source
model attribute to the<picture><source /><source />...<img /></picture>
view structure. -
downcastSrcsetAttribute( imageUtils, imageType ) → function
module:image/image/converters~downcastSrcsetAttribute
protected
Converter used to convert the
srcset
model image attribute to thesrcset
,sizes
andwidth
attributes in the view.Parameters
imageUtils : ImageUtils
imageType : 'imageBlock' | 'imageInline'
The type of the image.
Returns
function
-
upcastImageFigure( imageUtils ) → function
module:image/image/converters~upcastImageFigure
protected
Returns a function that converts the image view representation:
<figure class="image"><img src="..." alt="..."></img></figure>
to the model representation:
<imageBlock src="..." alt="..."></imageBlock>
The entire content of the
<figure>
element except the first<img>
is being converted as children of the<imageBlock>
model element.Parameters
imageUtils : ImageUtils
Returns
function
-
upcastPicture( imageUtils ) → function
module:image/image/converters~upcastPicture
protected
Returns a function that converts the image view representation:
<picture><source ... /><source ... />...<img ... /></picture>
to the model representation as the
sources
attribute:<image[Block|Inline] ... sources="..."></image[Block|Inline]>
Parameters
imageUtils : ImageUtils
Returns
function
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.