HTML输入到Rich文本框 [英] Html Input to Rich text box

查看:91
本文介绍了HTML输入到Rich文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何将HTML内容输入到Rich Text Box


RichTextBox.Text =< html>< body> Test </body></html>" ;;

Hi,

How do i can input a html Content to rich Text Box

Something like
RichTextBox.Text="<html><body>Test</body></html>";

推荐答案

精美的CodeProject文章,位于用于保存和加载"HTML精简版文件" [
Nice CodeProject article at An extended RichTextBox to save and load "HTML lite" files[^]


这项出色的CodeProject作品展示了一个基于System.Windows.Forms.RichTextBox:
的非常高级的HTML渲染器.
您将使用的专业HTML渲染器 [ ^ ].

即使我建议按原样使用此组件,而不必考虑像RTF这样的基本格式,但您想要的代码显然包含在该项目中.

现在,正如我认为的那样,您的最终目标很有可能可以使用渲染器组件,因此建议您从对最终目标的解释中开始所有问题.这样,您更有可能获得更好的建议.

—SA
This wonderful CodeProject work presents a very advanced HTML renderer based on System.Windows.Forms.RichTextBox:
A Professional HTML Renderer You Will Use[^].

Even though I would advice to use this component as is and forget about such a rudimentary format as RTF, the code you want is contained in this project, apparently.

Now, as I thinks it''s pretty likely that your ultimate goal can use the renderer component, I would recommend to start all your questions from explanations of your ultimate goals. This way it''s way more likely that you can get much better advice.

—SA


这篇关于HTML输入到Rich文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆