2013-4-20:我把老版本的代碼重構了一下,新版本賦值問題已完全解決,並且提供很多api給調用。推薦大家升級到最新版本。下載地址:http://tewuapple.github.io/WinHtmlEditor/
為雅安祈禱!
最新版截圖(優化前景色和背景色用戶體驗並且增強表格修改功能)
快捷鍵 功能
ctrl+b 給選中字設置為加粗
ctrl+c 復制選中內容
ctrl+x 剪切選中內容
ctrl+v 粘貼
ctrl+y 重新執行上次操作
ctrl+z 撤銷上一次操作
ctrl+i 給選中字設置為斜體
ctrl+u 給選中字加下划線
ctrl+a 全部選中
shift+enter 軟回車
Winform下的HTMLEditor引用Microsoft.mshtml的注意事項
有很多用戶發來反饋,說窗體加載的時候賦值賦不上去,后來發現是賦值的時候該控件還沒初始化完成,把賦值語句修改如下就正常了(同理其他屬性設置):
this.Shown += new EventHandler(Form_Shown); void Form_Shown(object sender, EventArgs e) { this.htmlEditor1.HTML = temp; }
如何使用該控件?(how to use WinHtmlEditor?)
詳情請下載解壓縮,看視頻文件,下載地址:how-to-use-WinhtmlEditor.rar
vb.net使用WinhtmlEditor,下載地址:vb.net使用WinhtmlEditor.rar (多謝群友完善)
如有任何問題或建議請加入QQ群:217478320
兼容.net 2.0以上
開源協議:apache2.0
2013-3-24:自定義按鈕顯示
新增對工具欄和右鍵菜單的可配置。如果你不想讓某些菜單顯示,請在app.config文件appSettings節點配置如下設置,即可:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="removeButtons" value="Cut,Paste"/> <add key="removeMenus" value="Cut,Paste"/> </appSettings> </configuration>
現在提供如下標簽設置:
New,Open,Print,Save,ShowHTML,Copy,Cut,Paste,Delete,Find,RemoveFormat,JustifyCenter,JustifyFull,JustifyLeft,JustifyRight,Underline,Italic,Bold,BackColor,
ForeColor,StrikeThrough,CreateLink,Unlink,InsertTable,InsertImage,InsertHorizontalRule,Outdent,Indent,InsertUnorderedList,InsertOrderedList,Superscript,
Subscript,WordCount,InsertDate,InsertTime,ClearWord,SpellCheck,About,Preview,AutoLayout,Undo,Redo
(2012-11-05)
新特性:
正式發布版本1.0.0.0(2012-06-30)
新特性:
1、字數統計
2、新加清除MS-Word格式、拼寫檢查、插入表格、日期、時間,上標、下標和打印功能
以下是最新版的截圖: