Studio Developer Manual / Version 2204
Table Of Contents
The previously shown OpenTabAction
has an additional Boolean configuration
parameter singleton
. In the example a button that opens a
CoreMediaTab
is added, which is a browse tab with the fix URL of the CoreMedia
homepage:
import Config from "@jangaroo/runtime/Config"; import EditorMainNavigationToolbar from "@coremedia/studio-client.main.editor-components/sdk/desktop/maintoolbar/EditorMainNavigationToolbar.ts" import AddItemsPlugin from "@coremedia/studio-client.ext.ui-components/plugins/AddItemsPlugin"; import Button from "@jangaroo/ext-ts/button/Button"; import OpenTabAction from "@coremedia/studio-client.main.editor-components/sdk/actions/OpenTabAction"; import CoreMediaTab from "./CoreMediaTab"; Config(EditorMainNavigationToolbar, { plugins: [ Config(AddItemsPlugin, { items: [ //... Config(Button, { itemId: "coremediaTab", baseAction: new OpenTabAction({ singleton: true, text: "...", tab: Config(CoreMediaTab), }), }), ], //... }), ], })
Example 9.85. Adding a button to open a browser tab
In the work area there will be no more than one opened CoreMediaTab
: When
clicking the button the already opened CoreMediaTab
will be active instead of
opening a new one.