# Get currently open main tab from iframe or in plugin

**URL:** https://community.onlyoffice.com/t/get-currently-open-main-tab-from-iframe-or-in-plugin/12706
**Category:** Docs
**Created:** [30 January 2025 06:21 UTC](https://community.onlyoffice.com/t/get-currently-open-main-tab-from-iframe-or-in-plugin/12706 "2025-01-30T06:21:05Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Constantine](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/constantine/32/1469_2.png) [@Constantine](https://community.onlyoffice.com/u/Constantine)
#### Post date: [3 February 2025 11:18 UTC](https://community.onlyoffice.com/t/get-currently-open-main-tab-from-iframe-or-in-plugin/12706/2 "2025-02-03T11:18:27Z")

</div>

Hello @jakob

> [@jakob](#):
>
> I tried `onToolbarMenuClick` in a plugin but that only works for custom added tabs as far as I understand.

Almost correct. This event works with plugin tabs. You can check out more info here:

> [@How to add a new plugin as a tab to ONLYOFFICE Docs](https://forum.onlyoffice.com/t/how-to-add-a-new-plugin-as-a-tab-to-onlyoffice-docs/10677):
>
> Originally published at: [How to add a new plugin as a tab to ONLYOFFICE Docs | ONLYOFFICE Blog](https://www.onlyoffice.com/blog/2024/09/how-to-add-a-new-plugin-as-a-tab-to-onlyoffice-docs/) With the release of [ONLYOFFICE Docs 8.1](https://www.onlyoffice.com/blog/2024/06/onlyoffice-docs-8-1-released?utm_source=blog&utm_medium=article&utm_id=plugin_as_tab_article), we’ve introduced a wide range of new features designed to enhance versatility and streamline the user experience. Among these improvements is the ability to display plugins in a separate tab. In this blog post, we’ll walk you through the steps to make the most of this new feature. [(no title)] What it’s all about This feature allows you to create a dedic…

As for the main toolbar tabs: there is no event that would allow that.

---

_[View the full topic](https://community.onlyoffice.com/t/get-currently-open-main-tab-from-iframe-or-in-plugin/12706)._
