/** * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /** * @module image/image/converters */ import type { DowncastDispatcher, UpcastDispatcher } from 'ckeditor5/src/engine.js'; import type ImageUtils from '../imageutils.js'; /** * Returns a function that converts the image view representation: * * ```html *
...
* ``` * * to the model representation: * * ```html * * ``` * * The entire content of the `
` element except the first `` is being converted as children * of the `` model element. * * @internal */ export declare function upcastImageFigure(imageUtils: ImageUtils): (dispatcher: UpcastDispatcher) => void; /** * Returns a function that converts the image view representation: * * ```html * ... * ``` * * to the model representation as the `sources` attribute: * * ```html * * ``` * * @internal */ export declare function upcastPicture(imageUtils: ImageUtils): (dispatcher: UpcastDispatcher) => void; /** * Converter used to convert the `srcset` model image attribute to the `srcset` and `sizes` attributes in the view. * * @internal * @param imageType The type of the image. */ export declare function downcastSrcsetAttribute(imageUtils: ImageUtils, imageType: 'imageBlock' | 'imageInline'): (dispatcher: DowncastDispatcher) => void; /** * Converts the `source` model attribute to the `...` * view structure. * * @internal */ export declare function downcastSourcesAttribute(imageUtils: ImageUtils): (dispatcher: DowncastDispatcher) => void; /** * Converter used to convert a given image attribute from the model to the view. * * @internal * @param imageType The type of the image. * @param attributeKey The name of the attribute to convert. */ export declare function downcastImageAttribute(imageUtils: ImageUtils, imageType: 'imageBlock' | 'imageInline', attributeKey: string): (dispatcher: DowncastDispatcher) => void;