简体   繁体   English

所见即所得的html编辑器查询

[英]WYSIWYG html editor query

I am in the process of creating a simple WYSIWYG HTML editor to enable the users of my application to design simple HTML emails. 我正在创建一个简单的WYSIWYG HTML编辑器,以使我的应用程序的用户能够设计简单的HTML电子邮件。

At the moment I have decided to use the web browser control with MSHTML to enable me to edit what is displayed. 目前,我决定将Web浏览器控件与MSHTML一起使用,以使我能够编辑显示的内容。 I have a tool bar which holds all of the relevant buttons, bold, underline, etc. 我有一个工具栏,其中包含所有相关按钮,粗体,下划线等。

I need a way to check if the current block has any formatting so the correct state can be displayed on the buttons in the tool bar. 我需要一种方法来检查当前块是否具有任何格式,以便可以在工具栏上的按钮上显示正确的状态。 I tried to add an event handler to the IHTMLDocument to fire when the mouse is moved or the arrow keys are pressed, however, this stopped the web browser from taking any input. 我试图将事件处理程序添加到IHTMLDocument中,以在移动鼠标或按下箭头键时触发,但是,这阻止了Web浏览器进行任何输入。

Is there a simpler way to achieve this goal? 有没有更简单的方法可以实现这一目标?

There are several rich editors for free out of that tinyMCE is one of the better editor. 有一些免费的丰富编辑器,tinyMCE是更好的编辑器之一。

For list of editors see the link below. 有关编辑列表,请参见下面的链接。

http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM