Window
Dialog
Dialog =
object
A dialog instance that can be closed programmatically.
Properties
close()
close: () =>
void
Returns
void
DialogOptions
DialogOptions =
object
Options for configuring a dialog.
Properties
closable?
optionalclosable:boolean
closeOnEscape?
optionalcloseOnEscape:boolean
draggable?
optionaldraggable:boolean
modal?
optionalmodal:boolean
position?
optionalposition:"left"|"right"|"top"|"bottom"|"center"|"topleft"|"topright"|"bottomleft"|"bottomright"
title?
optionaltitle:string
WindowSDK
WindowSDK =
object
Utilities to interact with the active page.
Properties
getActiveEditor()
getActiveEditor: () =>
Editor|undefined
Get the active editor.
Returns
Editor | undefined
The active editor.
showDialog()
showDialog: (
component:ComponentDefinition,options?:DialogOptions) =>Dialog
Show a dialog component.
Parameters
| Parameter | Type | Description |
|---|---|---|
component | ComponentDefinition | The custom slot content to display in the dialog. |
options? | DialogOptions | Options for the dialog. |
Returns
A dialog object that can be used to close the dialog.
showToast()
showToast: (
message:string,options?:object) =>void
Show a toast message.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message to show. |
options? | { duration?: number; variant?: "success" | "error" | "warning" | "info"; } | Options for the toast message. |
options.duration? | number | The duration of the toast message in milliseconds. |
options.variant? | "success" | "error" | "warning" | "info" | The variant of the toast message. |
Returns
void
