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-10/extensibility-api/web/web-extensions-howtos/tab-api.md
+23-26Lines changed: 23 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,29 +7,32 @@ weight: 60
7
7
8
8
## Introduction
9
9
10
-
This how-to shows you how to open a tab in Studio Pro from an extension. This tab will contain your web content.
10
+
This how-to describes how to open a tab in Studio Pro from an extension. This tab will contain your web content.
11
11
12
12
## Prerequisites
13
13
14
-
This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/getting-started/). Please complete that how-to before starting this one. You should also be familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/menu-api/).
14
+
Before starting this how-to, make sure you have completed the following prerequisites:
15
+
16
+
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/getting-started/). Complete that how-to before starting this one.
17
+
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/menu-api/).
15
18
16
19
## Opening a Tab
17
20
18
-
Firstly, create a menu item to open the tab. This is done inside the `loaded` event in `Main`. For more information see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/menu-api/).
21
+
Create a menu item to open the tab. This is done inside the `loaded` event in `Main`, as described below. For more information. see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-10/menu-api/).
19
22
20
-
In a listener event called `menuItemActivated` the `studioPro.ui.tabs.open(<tabinfo>, <uispec>)` call opens a new tab where:
23
+
In a listener event called `menuItemActivated`, the `studioPro.ui.tabs.open(<tabinfo>, <uispec>)` call opens a new tab where:
21
24
22
-
*`<TabInfo>` is an object containing the `title` of the tab, which will be shown in the title bar of your tab in Studio Pro.
25
+
*`<TabInfo>` is an object containing the `title` of the tab, which will be shown in the title bar of your tab in Studio Pro
23
26
*`<uispec>` is an object containing two required properties:
24
27
25
-
*`componentName`which is the name of the extension prefixed with "extension/". For example"extension/myextension" in the following example.
26
-
*`uiEntryPoint`which is the name mapped from the `manifest.json` file. See below for examples with multiple tabs.
28
+
*`componentName`– the name of the extension prefixed with "extension/"; for example,"extension/myextension" in the following example
29
+
*`uiEntryPoint`– the name mapped from the `manifest.json` file
27
30
28
31
{{% alert color="info" %}}
29
-
Whenever the tabs API `open` method is called, the `TabHandle` returned must be tracked by the extension so that it can be closed later by calling the `close` method.
32
+
Whenever the tabs API `open` method is called, the `TabHandle` returned must be tracked by the extension so it can be closed later by calling the `close` method.
30
33
{{% /alert %}}
31
34
32
-
An example of the class `Main` to open a tab called **My Extension Tab** looks similar to the following:
35
+
To open a tab called *My Extension Tab*, add the following code to the main entry point:
0 commit comments