kindeditor在dialog弹出框,无法编辑,不能获取焦点

问题描述:kindeditor在dialog弹出框,无法编辑,不能获取焦点


问题解决办法:

1.去掉页面或js初始化Kindeditor的操作

2.所有的初始化Kindeditor操作,由dialog操作

代码如下:


function jaes_dialog(){
    $("#div_controls").dialog({  
        title: "解决bug",  
        autoOpen: false,  
        height: 350,  
        width: 800,
        resizable :false,
        open: function () {  
                KindEditor.create('#ncontent', {  
                    resizeType: 0,  
                    allowPreviewEmoticons: false,  
                    allowImageUpload: false,  
                    afterBlur: function () {  
                        this.sync();  
                    },  
                    items: [  
                                'source', 'selectall', 'quickformat', '|', 'fontname', 'fontsize', '|', 'undo', 'redo', 'cut', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'lineheight', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'image', 'link']  
                });  
        },  
        buttons: [  
            {  
                text: "确定",  
                click: function () {  
                    //获得解决方案和bug的id  
                     alert("xxx");
                }  
            },  
            {  
                text: "取消",  
                click: function () {  
                    $(this).dialog("close");  
                }  
            }  
        ]  
    });  
    $("#div_controls").dialog("open");  
    

}


可以把方法考过去,对自己的div的ID改一下。解决这个问题

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值