zoukankan      html  css  js  c++  java
  • kindeditor和jquery easyui不兼容的问题-不显示与不能编辑的问题

    KindEditor 和 jQuery-easyui 插件有冲突

    浏览器版本:
    chrome firefox
    KindEditor版本:
    4.1.7
    BUG再现步骤:
    1. 在 jQuery-easyui 的tabs里加入

    再 文本区

    <textarea name="xxxxxxxxxxxxxxxxxxx"   style="80px; height:300px;">KindEditor</textarea>

    后面加上

    var editor1 = KindEditor.create('textarea[name="xxxxxxxxxxxxxxxxxxx"]', {
      allowFileManager : true
     });

    会出现 编辑器 但是无法编辑

    切换到html格式可以编辑 但是又切回去的时候 报这个错误

    Uncaught TypeError: Cannot call method 'getSelection' of undefined

    好像 easyui也有这个函数

    是不是这个冲突引起的 ?

    而且如果加在 KindEditor.ready(function(K) { 里面 根本不会走进去

    IE下正常 
    期望结果:

    因为 目前大多数公司 都是用 jQuery-easyui 做ui控件

    而且 我们主张客户用 chrome 但是 因为要用到编辑器

    感觉KindEditor非常棒 所以希望 KindEditor 能帮忙解决下

    和 easyui冲突的问题

    解决办法:

    要在dialog 开打之后,在加载,即 onOpen事件, 关闭后注销 onOpen: function (event, ui) {
    // 打开Dialog后创建编辑器

    KindEditor.create('#editor_content', {
    resizeType : 1,
     allowFileManager: true,
    uploadJson: '../../KindEditor/asp.net/upload_json.ashx',
    fileManagerJson: '../../KindEditor/asp.net/file_manager_json.ashx'
    });
    },
    onBeforeClose: function (event, ui) {
    // 关闭Dialog前移除编辑器
       KindEditor.remove('#editor_content');
    },
    


  • 相关阅读:
    XML WebService完全实例详细解析
    List (Java 2 Platform SE 5.0)
    frameset
    关于在outlook2007里面编辑签名的问题
    关于javax.servlet.Http.*;不能被引用的问题
    select标签HTML,刚做地。
    UIButton中setTitleEdgeInsets和setImageEdgeInsets的使用
    玩转UICollectionViewLayout
    常用公共方法
    cell嵌套UIWebView遇到的几个问题
  • 原文地址:https://www.cnblogs.com/cms100/p/4177967.html
Copyright © 2011-2022 走看看