ImageStyleFormat (image/imagestyle)
@ckeditor/ckeditor5-image/src/imagestyle/imagestyleediting
typedef
Object
The image style format descriptor.
import fullSizeIcon from 'path/to/icon.svg';
const imageStyleFormat = {
name: 'fullSize',
icon: fullSizeIcon,
title: 'Full size image',
className: 'image-full-size'
}
Filtering
Properties
-
className : String
The CSS class used to represent the style in the view.
-
icon : String
One of the following to be used when creating the style's button:
- An SVG icon source (as an XML string).
- One of
defaultIcons
to use a default icon provided by the plugin.
-
isDefault : Boolean
When set, the style will be used as the default one. A default style does not apply any CSS class to the view element.
-
name : String
The unique name of the style. It will be used to:
- Store the chosen style in the model by setting the
imageStyle
attribute of the<image>
element. - As a value of the
imageStyle
command, - when registering a button for each of the styles (
'imageStyle:{name}'
) in the UI components factory (this functionality is provided by theImageStyleUI
plugin).
- Store the chosen style in the model by setting the
-
title : String
The style's title.