Skip to content

Interface: UseImageDialogResult ​

Returned by useImageDialog().

Properties ​

PropertyModifierTypeDescription
statereadonlyReadonly<ShallowRef<ImageDialogState>>The controller state as a shallow ref; updated on the client while the scope is alive.

Methods ​

close() ​

ts
close(): void;

Close without applying and focus the editor. Does nothing while closed.

Returns ​

void


getAltHintProps() ​

ts
getAltHintProps(): VueProps;

Props for the hint text the alt input's aria-describedby points to.

Returns ​

VueProps


getAltInputProps() ​

ts
getAltInputProps(): VueProps;

Props for the alternative text input: id, value, aria-required, aria-describedby (hint, and error when invalid). Disabled and empty while the image is marked decorative.

Returns ​

VueProps


getBackdropProps() ​

ts
getBackdropProps(): VueProps;

An optional full-screen layer behind the panel; a press on it closes the dialog.

Returns ​

VueProps


getCancelProps() ​

ts
getCancelProps(): VueProps;

Props for the Cancel button, which closes the dialog.

Returns ​

VueProps


getDecorativeProps() ​

ts
getDecorativeProps(): VueProps;

Props for the "decorative image" checkbox.

Returns ​

VueProps


getDialogProps() ​

ts
getDialogProps(): VueProps;

The modal panel. Traps Tab inside and closes on Escape.

Returns ​

VueProps


getErrorProps() ​

ts
getErrorProps(): VueProps;

Props for the error message: role="alert", hidden while there is no error.

Returns ​

VueProps


getFormProps() ​

ts
getFormProps(): VueProps;

Props for the form: submit validates and applies instead of submitting the page.

Returns ​

VueProps


getSrcInputProps() ​

ts
getSrcInputProps(): VueProps;

Props for the address input: id, value, inputmode="url"; aria-invalid and aria-describedby on error.

Returns ​

VueProps


getTitleProps() ​

ts
getTitleProps(): VueProps;

Props for the dialog title: the id the dialog's aria-labelledby points to.

Returns ​

VueProps


getTriggerProps() ​

ts
getTriggerProps(): VueProps;

Props for the toolbar button: aria-label (add or edit image), aria-haspopup, aria-expanded, data-state; disabled without image support. Click opens the dialog; mousedown is prevented to keep the selection.

Returns ​

VueProps


openDialog() ​

ts
openDialog(): void;

Open for the selected image (edit) or a new one (insert).

Returns ​

void