Allow flowed text via MailExtension compose API
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: frederick888, Assigned: john)
Details
Attachments
(1 file)
Steps to reproduce:
- Make sure mailnews.send_plaintext_flowed is set to true
- Configure mail account to send plain text emails
- Open a new email composing window
- Use compose API setComposeDetails() to update its contents. isPlainText = true, plainTextBody has a trailing space at the end of each line
Actual results:
Trailing spaces are removed when the the email is sent, and the text isn't flowed despite having Content-Type: text/plain; charset=UTF-8; format=flowed.
Expected results:
Trailing spaces are preserved as if the text were physically typed into Thunderbird's email editor.
This allows extensions (and their users) to decide if they want flowed format. For example, I have a request at https://github.com/Frederick888/external-editor-revived/issues/48.
| Reporter | ||
Comment 1•3 years ago
|
||
Tested on 102.0.3 and got the same result as well.
| Assignee | ||
Comment 2•1 year ago
|
||
I made a proposal in https://github.com/Frederick888/external-editor-revived/issues/48#issuecomment-2122520905
Feedback is appreciated (best to keep the discussion on GitHub in this case).
| Assignee | ||
Comment 3•1 year ago
|
||
What we will do is to expose mailnews.send_plaintext_flowed in some sort of settings API, so you know if flowed is enabled or not.
As discussed in the github issue, an add-on can then decide if it wants to update the content of the editor with hard line breaks (if flowed is off), or remove all soft line breaks ( \n -> ) and let Thunderbird reflow the content and then apply its own flowed format.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
The API follows the concept of the browserSetting API from Firefox.
The first two exposed preferences allow extensions to check if outgoing
messages will be using flowed format and the max line length.
The file names for the schema and implementation files
of the messengerUtilities API are adjusted to match those from the
messengerSettings API.
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/924f9969cf2b
Introduce messengerSettings API and expose preferences for mailnews.send_plaintext_flowed and mailnews.wraplength. r=mkmelin
Description
•