-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose HTML e-mail, not just text in WebUI #247
Comments
I've had some thoughts about it. We could have a markdown-like editor. Where you type regular text and get to use bold/italic and list items, some way to include images, etc. We could have an HTML preview pane. Just like the github "compose comment". We would compose a message with both the text part and html part. It would probably work well enough for newly composed messages. But replies to fully-designed HTML messages, where would it start from? Should we turn the HTML into markdown and reply to that? Or extract the text of the HTML part and reply to that? Another option is full HTML editing. Possibly with "content-editable". I think we can still provides a bar of buttons to insert certain markup (bold/italic, colors, as DOM elements), and let users type their text. But would that mean we won't send any plain text part? Or how would we convert to plain text properly? No one wants to type messages twice. Also, the markup of the original message may become messed up (e.g. due to css rules that no longer match properly). There may be other options and techniques (e.g. browser support for html editing) that make this feasible/relatively easy to implement. I'm not eager to include huge amounts of code just to be able to write html messages. So far, the first option seems reasonable to me. But some experimentation with the second option should be done. And some research into how other (web)mail-clients are doing html editing. |
The main issue I currently see is that when you respond to HTML e-mail, history is erased, and you just see this at the end of e-mail:
So the real solution has to be able to respond to HTML e-mail you already received. I am not really much into controls, but having bold italic, font sizes etc. is fine. Generally I think the approach is that you either write plain text or HTML, if you write plain text, just plain text is sent, if you write HTML, plain text message with appropritate content is generated as well. |
Other mail clients do send email in both text and html. Thunderbird does this too. The results aren't always great. I wouldn't want to send a message that includes a text/plain part that's derived from an html part. There's a good chance it won't be readable. I can still be okay sending an HTML part that is rendered from the markdown (and verified with a preview). If you want to reply to an html message, include the original html message and make changes (eg add lines before/after), it seems like the contenteditable attribute would be needed. There are probably implications for security (we would add the html content to a DOM the user is interacting with). It would be good to get experience with contenteditable. I probably won't get to it soon... Another option could be to simply include the original message in a message/rfc822 part if you want to preserve the context. Then you could just write a new plain text part, or an html part (possibly using markdown) and send that as main content. I don't know how well mail applications render such messages. The mox webmail won't render such attached full messages (but it's on the todo list inside webmail/webmail.ts). |
Yes, this isn't really trivial task. And I am not really sure what is the best approach for mox. I have just seen some HTML => text when going through my imported e-mails, and it wasn't generally bad. Some standard HTML => text conversion would work, it would be nice to be able to see both HTML and converted text version before sending. |
Can there be some simple HTML editor to compose HTML e-mail?
The text was updated successfully, but these errors were encountered: