# How to add context menu on a new message window?

**URL:** <https://discourse.mozilla.org/t/how-to-add-context-menu-on-a-new-message-window/70040>\
**Category:** Add-ons\
**Tags:** webextensions-api\
**Created:** [November 3, 2020, 6:46am UTC](https://discourse.mozilla.org/t/how-to-add-context-menu-on-a-new-message-window/70040 "2020-11-03T06:46:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hercle](https://avatars.discourse-cdn.com/v4/letter/h/a183cd/32.png) [@hercle](https://discourse.mozilla.org/u/hercle)\
**Post date:** [November 3, 2020, 6:46am UTC](https://discourse.mozilla.org/t/how-to-add-context-menu-on-a-new-message-window/70040/1 "2020-11-03T06:46:11Z")

</div>

How to add context menu on a new message window?

I’d like to get a selected text on a new message.

I could same on a viewer of receiving mails.

messenger.menus.create({  
id: “get\_selection\_text”,  
title: “get\_selection\_text”  
contexts: [“selection”],  
onclick: function\_treating\_text  
});

---

<div class="post-metadata">

**Author:** ![DaveRo](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@DaveRo](https://discourse.mozilla.org/u/DaveRo)\
**Post date:** [November 3, 2020, 8:18am UTC](https://discourse.mozilla.org/t/how-to-add-context-menu-on-a-new-message-window/70040/2 "2020-11-03T08:18:32Z")

</div>

I suggest you ask here:  
[https://thunderbird.topicbox.com/groups/addons](https://thunderbird.topicbox.com/groups/addons)

---

<div class="post-metadata">

**Author:** ![hercle](https://avatars.discourse-cdn.com/v4/letter/h/a183cd/32.png) [@hercle](https://discourse.mozilla.org/u/hercle)\
**Post date:** [November 3, 2020, 8:46am UTC](https://discourse.mozilla.org/t/how-to-add-context-menu-on-a-new-message-window/70040/3 "2020-11-03T08:46:26Z")

</div>

Thank you for your suggestion.

I’ve made a same thread.
