说明,这三个开源工程都是来自codeproject
1、TextControl

TextControlSource.zip
本案例实现Tab和Ctrl+S的办法:
-
///
-
/// 根据反向回调调用窗体的方法
-
///
-
private void webBrowser1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
-
{
-
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.S)
-
{
-
if (this.Name.Equals("editorChild") && this.ParentForm is EditExamQuestion)
-
((EditExamQuestion)this.ParentForm).ChildNodeSave();
-
-
if (this.Name.Equals("editorRoot") && this.ParentForm is EditExamQuestion)
-
((EditExamQuestion)this.ParentForm).RootNodeSave();
-
-
if (this.Name.Equals("editorTopic") && this.ParentForm is EditExamQuestion)
-
((EditExamQuestion)this.ParentForm).EditorTopicSave();
-
}
-
-
if (e.KeyData == Keys.Tab)
-
Indent();
-
-
if (e.Modifiers == Keys.Shift && e.KeyCode == Keys.Tab)
-
Outdent();
-
-
this.webBrowser1.Focus();
-
}
2、ZetaHtmlEditControl

zetahtmleditcontrol-source.zip
3、FsRichTextBox

FsRichTextBox.rar
说明:
前两个是基于WebBroswer来实现。FsRichTextBox是基于richtextbox,没有图片导入及编辑功能。
目前三个开源版本都无法实现行间距的设置。待进一点研究。
阅读(4417) | 评论(0) | 转发(0) |