Damian
Damian

Reputation: 95

Thunderbird Extensions. How do I set message composer body?

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... Also Thunderbird API appears to have no documentation. Thank you in advance!

Upvotes: 1

Views: 567

Answers (1)

Qeole
Qeole

Reputation: 9184

There is some documentation available for Thunderbird's WebExtensions APIs, at:

https://thunderbird-webextensions.readthedocs.io/en/latest/.

If you are still trying to solve this issue, you should probably look at the compose API, in particular compose.setComposeDetails(), or at composeScripts. See also this answer.

Upvotes: 0

Related Questions