敏而好学笨鸟先飞 2016-10-10 08:34 采纳率: 100%
浏览 1195
已采纳

easyui的dialog中无法显示KingEdit内容(IE8下显示正常,IE9以上不行)

问题重现:
点击一个操作“编辑内容”之后,调用点击方法editContent(id)。
方法如下:

 //内容编辑
 //editContentDialog为dialog,
function editContent(id){
    $.post("selectTopicById.do",{id:id},function(result){
        var re = eval("("+result+")");
        if(re.id != null && re.id != ""){
            editor.html(re.editContent);
            $('#editContentDialog').css("display","block");
            $('#editContentDialog').dialog({
                title: '编辑内容',
                width: 800,
                height: 420,
                buttons:[{
                    text:'保存',
                    handler:function(){
                        var editContent = editor.html();
                        //这里提交数据到数据库
                        $.post("updateEditContent.do",{editContent:editContent,id:id},function(res){
                            var re = eval("("+res+")");
                            if(re.result=="OK"){
                                window.parent.parent.tishi("操作成功");
                                $("#editContentDialog").dialog('close');
                                $('#tender').qyfwGrid(options);
                            } else (re.result=="NO"){
                                window.parent.parent.tishi("操作失败");
                                $('#tender').qyfwGrid(options);
                            }
                        });
                    }
                },{
                    text:'取消',
                    handler:function(){
                        $("#editContentDialog").dialog('close');
                        $('#tender').qyfwGrid(options);
                        editor.html('');
                    }
                }],
              onClose:function(){
                    editor.html('');
                },
                modal: true
            });
        } else {
            window.parent.parent.tishi("操作失败");
        } 
    });
}

弹出的dialog中的kingEdit无法编辑,即无法输入内容。

大神,求解答。。。

  • 写回答

1条回答

  • Go 旅城通票 2016-10-18 01:51
    关注

    kindeditor吧。。你试试将kindeditor的初始化放到onOpen中初始化试试,可能你dialog容器默认隐藏的导致编辑器初始化失败什么的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题