Windows窗体应用程序中的HTML编辑器 [英] HTML Editor in a Windows Forms Application

查看:111
本文介绍了Windows窗体应用程序中的HTML编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在寻找适用于Windows应用程序(vb.net或c#)的WYSIWYG编辑器控件,以便用户可以在发送之前设计HTML电子邮件(使用点网框架中的SMTP对象发送)。

We are looking for a WYSIWYG editor control for our windows application (vb.net or c#) so that users can design HTML emails (to send using the SMTP objects in the dot net framework) before sending.

当前我们可以找到的所有可用编辑器均存在以下问题之一:

Currently all the available editors we can find have one of the following issues:


  1. 它们依赖于mshtml.dll或Web浏览器控件,这被证明对我们不可靠,因为在Windows 2000(IE6)下HTML代码和编辑器不同步

  1. They rely on mshtml.dll or the web browser control which as proven for us to be unreliable as the HTML code and the editor get out of sync under windows 2000 (IE6)

它们是基于Web的,而不是Windows窗体控件

They are web-based, not a windows form control

它们将样式放置在文档的开头(请参见下面的注释)

They place styles in the head of the document (see note below)

不幸的是,因为这 HTML电子邮件文章描述使HTML电子邮件与样式一起使用的唯一确定的方法是内联使用它们,现在看来,许多编辑器均不支持它们。

Unfortunately, as this HTML email article descries the only sure way of making HTML emails to work with styles is to use them inline which now seems to be unsupported in many editors.

是否没有人对此有任何经验或可以提出解决方案?

Does anyone have any experience in this or could suggest a solution?

推荐答案

我一直在使用这一个,它比WebBrowser稍低,但仍然使用MSHTML,它确实吐出了一些难看的HTML。出于我的目的,我正在使用WYSIWYG和HTML编辑模式(使用 ICSharp.TextEditor )带有Buffer类,以便在选项卡更改时进行更新。作为该Buffer类的一部分,我实际上通过HTML Tidy运行HTML 和一些scrub-n-replace位以获取有效的XHTML。

I've been using this one, which goes a little lower than the WebBrowser, but still uses MSHTML, which does spit out some ugly HTML. For my purposes, I am doing a multi-tabbed editor with WYSIWYG and HTML edit mode (using ICSharp.TextEditor) with a Buffer class to update whenever tabs change. As part of that Buffer class, I actually run the HTML through HTML Tidy and a few scrub-n-replace bits to get valid XHTML.

一种解决方案,因为我也未能找到某种不是从MSHTML衍生而来的解决方案,而最终只是继续使用上述解决方案以继续前进。

I only offer that as a solution because I, too, failed to find one that wasn't derived from MSHTML in some way and eventually just went ahead with the above solution to keep moving forward.

这篇关于Windows窗体应用程序中的HTML编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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