Is there a way that we can display context menu module conditionally?

Here is the scenario
We want to display an inline dialog on the selection of the text on the confluence page, but we want the context menu to be enabled for a certain type of text. For ex: when we select any @mention user on the confluence page, the comment is disabled. Can we achieve similar functionality with the context menu?

1 Like

There isn’t a way to not show your app’s context menu for a selected set of text based on the documentation here: https://developer.atlassian.com/platform/forge/manifest-reference/modules/#confluence-context-menu.

The closest you could come to getting a similar experience would be checking the selected text yourself once your app’s context menu option has been selected and then showing the different experiences based on the content of the text.

1 Like

Hi @bentley,

Thanks for helping out here. This is exactly what we have done. Would it be possible to add this functionality to the context menu module? This will be really helpful in developing a new feature around this.

Thanks,
Santwana

I put it in as a suggestion in the Forge backlog so that the Forge team is aware of the ask: [FRGE-380] - Ecosystem Jira Feel free to leave additional context/ideas on that issue!

2 Likes