Search results

ImageSettingsModel API in React Blockeditor API component

Interface for a class ImageSettings

Properties

allowedTypes

string[]

Specifies the allowed image file types that can be uploaded. Common types include ‘.jpg’, ‘.jpeg’, and ‘.png’.

altText

string

Specifies the alternative text to be displayed when the image cannot be loaded.

cssClass

string

Specifies one or more CSS classes to be applied to the image element. Useful for applying custom styles or themes.

height

string

Specifies the display height of the image. Can be defined in pixels or percentage.

maxHeight

string | number

Specifies the maximum height of the image in pixels or as a string unit. Prevents the image from being resized beyond this value.

maxWidth

string | number

Specifies the maximum width of the image in pixels or as a string unit. Prevents the image from being resized beyond this value.

minHeight

string | number

Specifies the minimum height of the image in pixels or as a string unit. Prevents the image from being resized below this value.

minWidth

string | number

Specifies the minimum width of the image in pixels or as a string unit. Prevents the image from being resized below this value.

readOnly

boolean

Specifies whether the image is in read-only mode. In read-only mode, editing or removing the image is not allowed.

saveFormat

SaveFormat

Specifies the format to save the image. Accepts either ‘base64’ for inline image encoding or ‘blob’ for binary object representation.

src

string

Specifies the image path.

width

string

Specifies the display width of the image. Can be defined in pixels or percentage.