To access the message content in the compose window:
let editor = gMsgCompose.editor; editor.outputToString('text/plain', editor.eNone)
For the different output methods, see nsIEditor.
We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS