# image/imagestyle/converters

module

<a id="functions">

## Functions

<a id="function-modelToViewStyleAttribute">

### `modelToViewStyleAttribute( styles ) → GetCallback<DowncastAttributeEvent>` _(internal)_

Returns a converter for the `imageStyle` attribute. It can be used for adding, changing and removing the attribute.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-image/src/imagestyle/converters.ts#L30)

#### Parameters

* `styles: Array<ImageStyleOptionDefinition>`

  An array containing available image style options.

#### Returns

* `GetCallback<DowncastAttributeEvent>`

  A model-to-view attribute converter.

<a id="function-viewToModelStyleAttribute">

### `viewToModelStyleAttribute( styles ) → GetCallback<UpcastElementEvent>` _(internal)_

Returns a view-to-model converter converting image CSS classes to a proper value in the model.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-image/src/imagestyle/converters.ts#L60)

#### Parameters

* `styles: Array<ImageStyleOptionDefinition>`

  Image style options for which the converter is created.

#### Returns

* `GetCallback<UpcastElementEvent>`

  A view-to-model converter.

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
