Comment 140 for bug 10883

Revision history for this message
In , Mikeweilgart (mikeweilgart) wrote :

(In reply to Jorg K (GMT+2) from comment #56)
> When in a plain text composition, it would read:
> Convert message to rich text (HTML).
> That would show the formatting toolbar, add the usual HTML options, like
> delivery mode, to the menu and convert the content of the message. Turn what
> I called embellishment (*bold*, _underline_, /italics/) into the respective
> HTML tags. That's quite hard, I think, since we also need list processing
> and superscripts (x^2).

I vehemently disagree with this interpretation of the proposal. First, if that type of formatting is desirable, there are plugins such as "Markdown Here" that can be used to accomplish that. Second, it means that converting to HTML is actually a *lossy* change, not lossless.

Under all circumstances, switching from plaintext composition mode to HTML composition mode and then back again without making edits should be effectively identical to not switching at all.

Switching from a *formatted* HTML email to plaintext email is unavoidably lossy. There should be an alert dialog about that, just as there is in Outlook or Apple Mail, and that's fine. But trying to be "smart" when converting plaintext to HTML, when that wasn't *explicitly requested*, would be a nightmare.

Plus, omitting this "smart" behavior would also make the feature tremendously simpler to implement. (And do so without breaking user expectations.)

I think the best description of the desired behavior has already been given (in the first comment on bug 216132):

> I'd like to add a button to the mail compose window. Clicking on this button
> would toggle editor between plain text and HTML. This may not even be possible.
> Just something that came up in the forums that I thought was a good idea.
>
> You would also need a dialog to come up and warn the user when converting from
> HTML to plain text about loss of formatting data.

And much like weirdkeen (comment #34), I would be happy to try to implement that—but I don't know where to do it.

Can someone point at the specific source code file(s) where such a feature would likely live?