image/image/converters
module
Functions
downcastImageAttribute( imageUtils, imageType, attributeKey ) → ( dispatcher: DowncastDispatcher ) => voidinternalmodule:image/image/converters~downcastImageAttributeConverter used to convert a given image attribute from the model to the view.
Parameters
imageUtils : ImageUtilsimageType : 'imageBlock' | 'imageInline'The type of the image.
attributeKey : stringThe name of the attribute to convert.
Returns
( dispatcher: DowncastDispatcher ) => void
downcastSourcesAttribute( imageUtils ) → ( dispatcher: DowncastDispatcher ) => voidinternalmodule:image/image/converters~downcastSourcesAttributeConverts the
sourcemodel attribute to the<picture><source /><source />...<img /></picture>view structure.Parameters
imageUtils : ImageUtils
Returns
( dispatcher: DowncastDispatcher ) => void
downcastSrcsetAttribute( imageUtils, imageType ) → ( dispatcher: DowncastDispatcher ) => voidinternalmodule:image/image/converters~downcastSrcsetAttributeConverter used to convert the
srcsetmodel image attribute to thesrcsetandsizesattributes in the view.Parameters
imageUtils : ImageUtilsimageType : 'imageBlock' | 'imageInline'The type of the image.
Returns
( dispatcher: DowncastDispatcher ) => void
upcastImageFigure( imageUtils ) → ( dispatcher: UpcastDispatcher ) => voidinternalmodule:image/image/converters~upcastImageFigureReturns a function that converts the image view representation:
<figure class="image"><img src="..." alt="..."></img></figure>Copy codeto the model representation:
<imageBlock src="..." alt="..."></imageBlock>Copy codeThe entire content of the
<figure>element except the first<img>is being converted as children of the<imageBlock>model element.Parameters
imageUtils : ImageUtils
Returns
( dispatcher: UpcastDispatcher ) => void
upcastPicture( imageUtils ) → ( dispatcher: UpcastDispatcher ) => voidinternalmodule:image/image/converters~upcastPictureReturns a function that converts the image view representation:
<picture><source ... /><source ... />...<img ... /></picture>Copy codeto the model representation as the
sourcesattribute:<image[Block|Inline] ... sources="..."></image[Block|Inline]>Copy codeParameters
imageUtils : ImageUtils
Returns
( dispatcher: UpcastDispatcher ) => void