Interface: UseImageDialogResult
Returned by useImageDialog().
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
state | readonly | Readonly<ShallowRef<ImageDialogState>> | The controller state as a shallow ref; updated on the client while the scope is alive. |
Methods
close()
close(): void;Close without applying and focus the editor. Does nothing while closed.
Returns
void
getAltHintProps()
getAltHintProps(): VueProps;Props for the hint text the alt input's aria-describedby points to.
Returns
getAltInputProps()
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
getBackdropProps()
getBackdropProps(): VueProps;An optional full-screen layer behind the panel; a press on it closes the dialog.
Returns
getCancelProps()
getCancelProps(): VueProps;Props for the Cancel button, which closes the dialog.
Returns
getDecorativeProps()
getDecorativeProps(): VueProps;Props for the "decorative image" checkbox.
Returns
getDialogProps()
getDialogProps(): VueProps;The modal panel. Traps Tab inside and closes on Escape.
Returns
getErrorProps()
getErrorProps(): VueProps;Props for the error message: role="alert", hidden while there is no error.
Returns
getFormProps()
getFormProps(): VueProps;Props for the form: submit validates and applies instead of submitting the page.
Returns
getSrcInputProps()
getSrcInputProps(): VueProps;Props for the address input: id, value, inputmode="url"; aria-invalid and aria-describedby on error.
Returns
getTitleProps()
getTitleProps(): VueProps;Props for the dialog title: the id the dialog's aria-labelledby points to.
Returns
getTriggerProps()
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
openDialog()
openDialog(): void;Open for the selected image (edit) or a new one (insert).
Returns
void