//1  重写kindedit    -建一个js文件 easyui_kindeditor.js

(function ($, K) {

    if (!K)

        throw "KindEditor没有定义!";



    function create(target) {

        var opts = $.data(target, 'kindeditor').options;

        var editor = K.create(target, opts);

        $.data(target, 'kindeditor').options.editor = editor;

    }



    $.fn.kindeditor = function (options, param) {

        if (typeof options == 'string') {

            var method = $.fn.kindeditor.methods[options];

            if (method) {

                return method(this, param);

            }

        }

        options = options || {};

        return this.each(function () {

            var state = $.data(this, 'kindeditor');

            if (state) {

                $.extend(state.options, options);

            } else {

                state = $.data(this, 'kindeditor', {

                        options : $.extend({}, $.fn.kindeditor.defaults, $.fn.kindeditor.parseOptions(this), options)

                    });

            }

            create(this);

        });

    };



    $.fn.kindeditor.parseOptions = function (target) {

        return $.extend({}, $.parser.parseOptions(target, []));

    };



    $.fn.kindeditor.methods = {

        editor : function (jq) {

            return $.data(jq[0], 'kindeditor').options.editor;

        }

    };



    $.fn.kindeditor.defaults = {

        resizeType : 1,

        allowPreviewEmoticons : false,

        allowImageUpload : false,

        uploadJson : '${ctx}/wxMessage/uploadImg.yhtml',

        fileManagerJson : '${ctx}/wxMessage/uploadImg.yhtml',

        items : [

'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',  

'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',  

'insertunorderedlist', '|', 'emoticons', 'image', 'link','fullscreen','wordpaste','source'],

        afterChange:function(){

            this.sync();//这个是必须的,假设你要覆盖afterChange事件的话,请记得最好把这句加上.

        }

    };

    $.parser.plugins.push("kindeditor");

})(jQuery, KindEditor);

//2   在页面引入  必要的文件   ——kindeditor-4.1.10能够在官方上下载到

<link href="../kindeditor-4.1.10/examples/index.css" rel="stylesheet" />

    <script src="../kindeditor-4.1.10/kindeditor.js"></script>

    <script src="../kindeditor-4.1.10/kindeditor-all.js"></script>

    <script src="../kindeditor-4.1.10/kindeditor-all-min.js"></script>

    <script src="../kindeditor-4.1.10/kindeditor-min.js"></script>

    <script src="../kindeditor-4.1.10/lang/zh_CN.js"></script>

    <script type="text/javascript"

        src="<%=request.getContextPath()%>/js/easyui_kindeditor.js"></script>

// 3   页面上用

<input id="content" name="content" class="easyui-kindeditor" style="width: 90%; height: 140px;visibility: hidden;" options="validType:'length[0,500]'" />

//编辑器

<script type="text/javascript">

var editor;

         KindEditor.ready(function (K) {

             editor = K.create('textarea[name="content"]', {

                 allowFileManager: true,

                 resizeType: 1,

                 allowPreviewEmoticons: false,

                 items: [

                     'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',

                     'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',

                     'insertunorderedlist', '|', 'emoticons', 'image', 'link']

             });

         });

</script>

// 4   dataGrid 改动时  赋值  编辑框仅仅能手动赋值    row-选中行的数据    content 编辑器id   填充内容row.content     KindEditor是我们上面重写kindedit是定义的名字

function editWxSendMessage(row){

    $("#win").window('open');

    $("#wxsendmessageInfoForm").form('clear');

    $("#wxsendmessageInfoForm").form("load", row);

    KindEditor.html('#content', row.content);

}

easyui编辑器(kindeditor-4.1.10)的更多相关文章

  1. easyUI整合富文本编辑器KindEditor详细教程(附源码)

    原因 在今年4月份的时候写过一篇关于easyui整合UEditor的文章Spring+SpringMVC+MyBatis+easyUI整合优化篇(六)easyUI与富文本编辑器UEditor整合,从那 ...

  2. EasyUI在window中使用kindeditor 4.1.10在IE9中不能回显、获得焦点编辑的问题

    描述 :kindeditor4.1.10版本是当前最新的版本,在浏览器兼容性和功能方面都是值得一赞的,在开发中能方便快捷的满足一些开发需求. 问题 :  问题总是有的.  在使用过程中,遇到EasyU ...

  3. KindEditor 4.1.10 (2013-11-23)首行空格不能显示在编辑器内

    KindEditor版本: KindEditor 4.1.10 (2013-11-23) 一.BUG再现步骤: 1.文章前面插入二个全角空格作为缩进,因为并非所有段落都有缩进故不采用 CSS 的 te ...

  4. 后台文本编辑器KindEditor介绍

    后台文本编辑器KindEditor介绍 我们在自己的个人主页添加文章内容的时候,需要对文章内容进行修饰,此时就需要文本编辑器助阵了! 功能预览 KindEditor文本编辑器 KindEditor文本 ...

  5. 富文本编辑器 KindEditor 的基本使用 文件上传 图片上传

    富文本编辑器 KindEditor 富文本编辑器,Rich Text Editor , 简称 RTE , 它提供类似于 Microsoft Word 的编辑功能. 常用的富文本编辑器: KindEdi ...

  6. 富文本编辑器kindeditor配置

    <!--富文本编辑器kindeditor配置↓ --> <link type="text/css" rel="stylesheet" href ...

  7. ASP.NET MVC+EF框架+EasyUI实现权限管理系列(10)- VSS源代码管理

    原文:ASP.NET MVC+EF框架+EasyUI实现权限管理系列(10)- VSS源代码管理 ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇)   (1):框架搭建    ( ...

  8. python 全栈开发,Day83(博客系统子评论,后台管理,富文本编辑器kindeditor,bs4模块)

    一.子评论 必须点击回复,才是子评论!否则是根评论点击回复之后,定位到输入框,同时加入@评论者的用户名 定位输入框 focus focus:获取对象焦点触发事件 先做样式.点击回复之后,定位到输入框, ...

  9. 使用富文本编辑器Kindeditor

    今天在做需求的时候,遇到有一个字段,需要保存带有格式的内容,决定使用富文本框编辑器Kindeditor来实现,解决方法如下: 登录官网下载控件包: http://kindeditor.net/down ...

  10. 将Ecshop后台fckeditor升级更改为kindeditor 4.1.10编辑器

    ecshop在win8部分电脑上,不管用任何浏览器,都打不开,即使升级到最新版本都不行,问题应该吃在fckeditor兼容上.fckeditor 很久未升级,换掉该编辑器是最佳方法 第一步:下载kin ...

随机推荐

  1. j-link修复 write flash 一直无法点击

    write flash 一直无法点击 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXFfMTcyNDI5NTc=/font/5a6L5L2T/fonts ...

  2. svn 服务器的搭建

     SVN服务器运行模式:模式1:svn服务器单独运行  监听: 3690端口    访问: svn://IP模式2: svn 服务器+ apache   : 80 端口  访问: http://IP  ...

  3. cmd 进入mysql 小技巧

    1.開始中找出执行:输入cmd 2.查找appserv所在盘,我的在D盘.所以接着输入:d: 3.在d盘中查找mysql所在文件夹:cd appserv\mysql\bin 4.再输入主机名.数据库名 ...

  4. zzulioj--1638--Happy Thanksgiving Day - Say 3Q I(水题)

    1638: Happy Thanksgiving Day - Say 3Q I Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 91  Solved: ...

  5. Oracle 优化和性能调整

    分析评价Oracle数据库性能主要有数据库吞吐量.数据库用户响应时间两项指标.数据库用户响应时间又可以分为系统服务时间和用户等待时间两项,即:  数据库用户响应时间=系统服务时间+用户等待时间  因此 ...

  6. 杂项-编程:AOP(面向切面编程)

    ylbtech-杂项-编程:AOP(面向切面编程) 在软件业,AOP为Aspect Oriented Programming的缩写,意为:面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一 ...

  7. CentOS 6.7操作系统安装

    如果由于是显卡驱动不兼容的话,在选择安装界面按tab键,进入命令行,然后在命令行后加上 nodmraid 关键字回车开始安装. 接下来选择hard driver   选择最后一个分区进行系统安装,然后 ...

  8. 将maven项目中依赖的jar包导出到指定的目录

    <plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> &l ...

  9. Hibernate框架学习(六)——一对多&多对一关系

    一.关系表达 1.表中的表达 2.实体中的表达 3.orm元数据中的表达 一对多:(在Customer.hbm.xml中添加) 多对一:(在LinkMan.hbm.xml中添加) 最后别忘了在hibe ...

  10. http接口服务方结合策略模式实现总结

    在项目中,我们经常会使用到http+xml的接口,而且不仅仅的是一个,可能会有多个http的接口需要实时的交互.但是http接口的接收消息的公共部分是一样的,只有每个接口的报文解析和返回报文是不同的, ...