资源简介

本资源是通过winform客户端加载本地文本编辑器源码实现了富文本编辑功能;.net framework 4.0 C/S 亲测可用,属于曲线救国类型的源码,虽是曲线救国但是曲线不是很曲,资源分享,欢迎回复。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace WinformHTMLEditor
{
    [ComVisible(true)]
    public partial class Form1 : Form
    {
        string content = ““;//声明变量
        public Form1()
        {
            InitializeComponent();
            //初始化读取模版
            this.webBrowser1.Url = new System.Uri(Application.StartupPath + “\\kindeditor\\e.html“ System.UriKind.Absolute);
            this.webBrowser1.objectForscripting = this;//加载js必须给当前类加ComVisible 属性确保对com可见

        }
        //内容初始值否则webbrowser刚开始会没值
        public string GetContent()
        {
            return content;
        }
        //如果在窗体load事件为其赋值则用于窗体加载完为webBrowser重新赋值
        public void RequestContent(string str)
        {
            content = str;
            richTextBox1.Text = content;
        }
        //操作txt源码框时的方法
        private void richTextBox1_TextChanged(object sender EventArgs e)
        {
            if (richTextBox1.Focused)
            {
                content = richTextBox1.Text;
                webBrowser1.Document.Invokescript(“setContent“ new object[] { content });
            }
        }
        //操作webbrowser页面刷新本身
        private void webBrowser1_Resize(object sender EventArgs e)
        {
            this.webBrowser1.Refresh();
        }

        
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        490  2009-06-11 05:14  WinformHTMLEditor\WinformHTMLEditor\bin\Debug\WinformHTMLEditor.vshost.exe.manifest

     文件       1741  2011-11-17 23:00  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp\demo.asp

     文件       6574  2011-08-13 22:20  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp\file_manager_json.asp

     文件       4736  2010-07-28 14:32  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp\JSON_2.0.4.asp

     文件      16267  2011-09-11 13:00  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp\UpLoad_Class.asp

     文件       3140  2011-09-11 11:58  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp\upload_json.asp

     文件      49664  2010-07-28 14:32  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp.net\bin\LitJSON.dll

     文件       1686  2011-08-16 17:00  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp.net\demo.aspx

     文件       5970  2011-08-07 20:45  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp.net\file_manager_json.ashx

     文件        466  2010-07-28 14:32  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp.net\README.txt

     文件       3399  2011-08-14 11:34  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\asp.net\upload_json.ashx

     文件       1537  2015-03-23 17:39  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\e.html

     文件       1004  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\colorpicker.html

     文件       2507  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\custom-plugin.html

     文件        823  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\custom-theme.html

     文件       2285  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\default.html

     文件        946  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\dialog.html

     文件       1024  2011-09-27 22:26  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\dynamic-load.html

     文件        833  2011-12-11 14:12  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\file-dialog.html

     文件        891  2011-09-28 21:00  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\file-manager.html

     文件        747  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\filter-mode.html

     文件        851  2011-10-03 23:19  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\image-dialog.html

     文件        282  2011-08-09 12:50  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\index.css

     文件       2426  2011-12-10 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\index.html

     文件        698  2011-10-29 22:38  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\jquery.html

     文件        743  2011-10-29 22:38  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\mootools.html

     文件       1014  2011-11-24 11:27  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\multi-language.html

     文件        993  2011-09-25 23:05  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\newline.html

     文件       1371  2011-08-11 12:59  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\node.html

     文件        996  2011-10-16 21:48  WinformHTMLEditor\WinformHTMLEditor\bin\x86\Debug\kindeditor\examples\paste-type.html

............此处省略563个文件信息

评论

共有 条评论