WB Editor 1.0 的一些核心技术

November 10th, 2004

WYSIWYG 编辑器
WB Editor 的核心是大名鼎鼎的 Nikhil Kothari 的 HtmlEditor Control,它什么都好就是载入内容到编辑器去的方法是错的。它生成的 stream 不支持中文。于是我改进了它,中文、日文没有问题了。但是,如果 IE Encoding 用 UTF8,WB Editor 可能中文出乱码。后来在 http://www.itwriting.com/htmleditor 的 htmleditor 中找到了创建 unicode stream 的正确办法,还实现了印度文支持。

xhtml
WB Editor 无法连接 b2evo,因为 b2evo 要求输入为 xhtml。逼得我从 dasBlog 中挖掘出了个html formatting 工具包,也是 Nikhil Kothari 的作品。

安装程序
原先用 MAKEMSI 工具做的 WB Editor 安装程序有个缺点,就是无法检测并提醒用户去下载安装 .NET Framework。以至于不看 readme.txt 的用户不知道这一先决条件。受到 WiX for dummies 一文的启发,找到了个办法: 找来原始的 wbeditor.msi,再找来一个能检测 .NET 的 msi 。两个 msi 都用 wix 反编译出来 (用其 dark /x 工具),然后,把得到的两个 wix xml 文件巧妙地和并起来,最后用 candle 和 light 工具重新编译生成新的 msi。

HTML 语法加亮
参考了很多资料,总算做出了一个不闪烁的  html 加亮编辑器。但是自己非常不满意:相应速度不好,没有代码提示、自动完成、没有 as you type 语法检查。准备有空研究研究 SharpDevelop 里的编辑器。

插件技术
另文详细介绍

Entry Filed under: Programming

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Most Recent Posts


1