You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/command-api.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,28 +29,25 @@ To register commands, use the Commands API `registerCommand`.
29
29
In the sample code below, we register a command, then attach it to a menu by setting the property `commandId` to the `Menu` object.
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/dialog-api.md
This how-to describes how to open a modal dialog in Studio Pro from an extension. This dialog will contain your web content.
9
+
This how-to describes how to open a modal dialog in Studio Pro from an extension, allowing you to display web content.
10
+
11
+
It also describes how to show a progress dialog that follows a sequence of steps and returns a result upon completion.
10
12
11
13
## Prerequisites
12
14
@@ -19,7 +21,7 @@ Before starting this how-to, make sure you have completed the following prerequi
19
21
20
22
Create a menu item to open the dialog. This is done inside the `loaded` event in the main entry point (`src/main/index.ts`). For more information, see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
21
23
22
-
In a listener event called `menuItemActivated`, the `studioPro.ui.dialogs.showModal(<dialogInfo>, <uiSpec>)` call opens a new tab where:
24
+
In a listener event called `menuItemActivated`, the `studioPro.ui.dialogs.showModal(<dialogInfo>, <uiSpec>)` call opens a new dialog where:
23
25
24
26
*`<dialogInfo>` is an object containing the `title` of the dialog, which is shown in the title bar of your dialog in Studio Pro. It also contains the `contentSize` object, where `height` and `width` dimensions for the dialog can be provided.
25
27
*`<uiSpec>` is an object containing two required properties and one optional property:
@@ -227,6 +229,118 @@ You can modify the dimensions of a dialog using the dialog API's `update` method
227
229
228
230
Youcanalsomodifythedialog's dimensions while it is open.
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/menu-api.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ A menu has the following properties:
28
28
|`hasSeparatorBefore` <br> (default: `false`) | Adds a visual separator before the item |
29
29
|`hasSeparatorAfter` <br> (default: `false`) | Adds a visual separator after the item |
30
30
|`enabled` <br> (default: `true`) | Indicates that the menu item notifies the listener when clicked |
31
+
|`commandId` (optional) | The id of the previously registered command, which executes when the menu is clicked |
32
+
|`action` (optional) | The action that executes when the menu is clicked |
0 commit comments