# Thunderbird Extensions. How do I set message composer body?

**URL:** <https://discourse.mozilla.org/t/thunderbird-extensions-how-do-i-set-message-composer-body/36824>\
**Category:** Add-ons\
**Created:** [March 11, 2019, 11:14am UTC](https://discourse.mozilla.org/t/thunderbird-extensions-how-do-i-set-message-composer-body/36824 "2019-03-11T11:14:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hombr33](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@Hombr33](https://discourse.mozilla.org/u/Hombr33)\
**Post date:** [March 11, 2019, 11:14am UTC](https://discourse.mozilla.org/t/thunderbird-extensions-how-do-i-set-message-composer-body/36824/1 "2019-03-11T11:14:47Z")

</div>

I am currently developing an extension which needs to encrypt the body of the email you are writing. I already did the encryption part, but now I need to display a html in the message composer window. I already know how to extract the text with:

```
var msgComposer = window.gMsgCompose;
var editor = msgComposer.editor; 
var text = editor.outputToString('text/plain', editor.eNone);

```

I haven’t found a way to set the mail body however…
