I'm writing a little email handling applet. It either sends an email (elementary, I know) or replies to a received email. In the latter case, I want to display the original email below the TextBox for the user's message. I have another TextBox there, but I realize that most email clients utilize HTML formatting in one way or another, and this will not display properly in a TextBox.
我在写一个小的电子邮件处理小程序。它要么发送一封电子邮件(我知道是基本的),要么回复一封收到的邮件。在后一种情况下,我希望将原始邮件显示在文本框下面,以供用户使用。我有另一个文本框,但我意识到大多数电子邮件客户都以这样或那样的方式使用HTML格式,这在文本框中不会正确显示。
I don't really have any desire to let the user format their email in some fancy pre-built WYSIWYG editor (most potential solutions I have encountered suggest something of this sort), I just want to allow for the possibility that the received email is formatted with HTML. I'm equally content to strip all HTML formatting from the original message as I am to display the original HTML content in a control other than a TextBox, and append it untouched to the unformatted user input when sending the reply, but I don't see and can't find an elegant way to accomplish either.
我并没有任何想让用户把他们的电子邮件格式化为一些高级的预构建的WYSIWYG编辑器(我遇到的大多数潜在的解决方案都有这样的建议),我只是想考虑一下收到的电子邮件是用HTML格式化的。我同样内容带所有HTML格式的原始消息我显示原始HTML内容控制以外的一个文本框,并将它没有附加到无格式的用户输入发送应答的时候,但我不认为,找不到一种优雅的方式来完成。
Any help is greatly appreciated. Thanks!
非常感谢您的帮助。谢谢!
1 个解决方案
#1
0
Just show the HTML if it's text/html and perhaps have a preview button or pane with a WebBrowser in it you can pipe the HTML to.
只要显示HTML,如果它是文本/ HTML,或者有一个预览按钮或窗格,里面有一个WebBrowser,你就可以把HTML导入。
#1
0
Just show the HTML if it's text/html and perhaps have a preview button or pane with a WebBrowser in it you can pipe the HTML to.
只要显示HTML,如果它是文本/ HTML,或者有一个预览按钮或窗格,里面有一个WebBrowser,你就可以把HTML导入。