kindeditor和jquery easyui不兼容的问题-不显示与不能编辑的问题

KindEditor 和 jQuery-easyui 插件有冲突

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

再 文本区

<textarea name="xxxxxxxxxxxxxxxxxxx"   style="width: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');
},

 


转载于:https://www.cnblogs.com/cms100/p/4177967.html

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值