UNPKG

1.16 kBTypeScriptView Raw
1/**
2 * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4 */
5import type { DowncastAttributeEvent, UpcastElementEvent } from 'ckeditor5/src/engine';
6import { type GetCallback } from 'ckeditor5/src/utils';
7import type { ImageStyleOptionDefinition } from '../imageconfig';
8/**
9 * @module image/imagestyle/converters
10 */
11/**
12 * Returns a converter for the `imageStyle` attribute. It can be used for adding, changing and removing the attribute.
13 *
14 * @param styles An array containing available image style options.
15 * @returns A model-to-view attribute converter.
16 */
17export declare function modelToViewStyleAttribute(styles: Array<ImageStyleOptionDefinition>): GetCallback<DowncastAttributeEvent>;
18/**
19 * Returns a view-to-model converter converting image CSS classes to a proper value in the model.
20 *
21 * @param styles Image style options for which the converter is created.
22 * @returns A view-to-model converter.
23 */
24export declare function viewToModelStyleAttribute(styles: Array<ImageStyleOptionDefinition>): GetCallback<UpcastElementEvent>;