Kindeditor在LigerUI中无法获得焦点

来源:互联网 发布:哪些明星在淘宝开店 编辑:程序博客网 时间:2024/06/04 17:49

项目中需要用到LigerUI的弹窗然后富文本用的是Kindeditor插件,之前一直有个问题就是,Kindeditor无法获得焦点,只能是在fullscreen的情况下获取焦点。在网上找了半天都是JQuery UI的方法,和我遇到的情况不一样。于是就靠自己琢磨,现在弄出来了,只需要把Kindeditor的初始化部分放到$.ligerDialog.open方法的后面就可以了。

以下为调整后的代码:

function xinzeng(){         $.ligerDialog.open({               width:750,               height:800,               title : '发布新闻',               target: $("#target"),               showMax: false,               showToggle: true,               showMin: false,               isResize: true,               slide: false,           });         editor =KindEditor.create('textarea[name="content1"]', {       allowFileManager : true,           allowImageUpload: true, //多图上传       uploadJson :'<%=basePath%>fdirms/fileUpload',              });        } 

这样就可以获取富文本的焦点了。

阅读全文
0 0
原创粉丝点击