Skip to content

Function: createImageDialog() ​

ts
function createImageDialog(editor, options?): ImageDialog;

Behaviour and accessibility for adding an image by address and editing its text alternative (WAI-ARIA modal dialog pattern): focus moves into the dialog and stays there (Tab cycles), Escape or Cancel closes it, focus returns to the editor. Alt text is required unless the image is marked decorative, which stores alt="" on purpose. Needs advancedSchema() in the editor; the image's src is checked by the schema.

Parameters ​

ParameterType
editorEditor
options?ImageDialogOptions

Returns ​

ImageDialog