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/dockable-pane-api.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ This how-to describes how to create and manage a dockable pane using the web ext
16
16
## Prerequisites
17
17
18
18
* This how-to uses the app created in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Make sure to complete that how-to before starting this one.
19
-
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/)
19
+
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
20
20
21
21
## Creating a Dockable Pane
22
22
@@ -36,7 +36,7 @@ To open a dockable pane, you must first register the dockable pane handle with t
36
36
});
37
37
```
38
38
39
-
You can then create two menus that will respectively open and close the pane by calling the `panes` API:
39
+
You can then create two menus that will open and close the pane by calling the `panes` API:
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/documents-api.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This how-to describes how to create context menus for a document editor. In the
13
13
Before starting this how-to, make sure you have completed the following prerequisites:
14
14
15
15
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Please complete that how-to before starting this one.
16
-
*Read up on how menus work in the Extensibility API [here](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/)
16
+
*Review [how menus work](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) in the Web Extensibility API.
17
17
18
18
## Creating a Context Menu
19
19
@@ -24,7 +24,7 @@ Use the full name of the document type (for example, `DomainModels$Entity` for e
24
24
The code below does the following:
25
25
26
26
1. Create a menu object with a `DocumentContext`.
27
-
3. Uses the `documents` API's `addContextMenu` method to add the menu to an entity inside the domain model editor
27
+
2. Use the `documents` API's `addContextMenu` method to add the menu to an entity inside the domain model editor.
As you can see from the example above, the expected payload of the menu action is `DocumentContext`, i.e. an object containing a document id (`{ documentId: string }`). The `documentId` will be the id of the document the menu is attached to, in this case, the exact entity in the Domain Model editor canvas.
55
+
As you can see from the example above, the expected payload of the menu action is `DocumentContext` (for example, an object containing a document id (`{ documentId: string }`)). The `documentId` will be the Id of the document the menu is attached to (in this example, the exact entity in the domain model editor canvas).
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/editor-api.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,15 @@ This how-to describes how to open an existing document editor in Studio Pro from
13
13
Before starting this how-to, make sure you have completed the following prerequisites:
14
14
15
15
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
16
-
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/)
16
+
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
17
17
18
18
## Opening a Document Editor
19
19
20
20
Create a menu item following the steps in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
21
21
22
22
This menu action will look for the `Home_Page` document in `MyFirstModule` (however, you can use any module or document in your app). It will then open it with the editor API. For more information, see [Access a Mendix Model Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/model-api/).
23
23
24
-
For this example, create a menu with an action that performs the following steps:
24
+
For this example, create a menu with an action by doing the following steps:
25
25
26
26
1. Look for the page by its name, and by the name of its containing module using the `studioPro.app.model.pages` API.
27
27
2. Call `studioPro.ui.editors.editDocument` to open the document by passing its ID.
@@ -58,8 +58,9 @@ The editor API notifies the extension when the active document tab is activated
58
58
59
59
Both the `getActiveDocument` method and the `activeDocumentChanged` event args returns a `ActiveDocumentInfo` object, which contains the document's name, type, container, module name, and id.
60
60
61
-
See the sample code below, where we register an event listener for getting notified when the active document is changed. Also here we add a menu to get this information on demand.
62
-
Don't forget to import `ActiveDocumentInfo` from `@mendix/extensions-api`.
61
+
See the sample code below, which registers an event listener to be notified when the active document changes. We also add a menu that lets you retrieve this information on demand.
62
+
63
+
Remember to import `ActiveDocumentInfo` from `@mendix/extensions-api`.
63
64
64
65
```typescript
65
66
studioPro.ui.editors.addEventListener("activeDocumentChanged", async ({ info }) => {
0 commit comments