Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ajax调用后在IE11中不能编辑CKEditor_Ajax_Ckeditor_Internet Explorer 11 - Fatal编程技术网

ajax调用后在IE11中不能编辑CKEditor

ajax调用后在IE11中不能编辑CKEditor,ajax,ckeditor,internet-explorer-11,Ajax,Ckeditor,Internet Explorer 11,例如: 如果第一次加载页面,则CKEditor工作正常,并且可以编辑编辑器的值。点击正在调用以下函数的按钮“ajax”后(光标必须位于编辑器字段中): 函数ajax\u call(){ var html=“test1test2test3jQuery(document).ready(function(){ckEditor('textarea');});”; $.post(“/echo/html/”,{html:html},函数(数据){ jQuery('#target').html(数据); }

例如:

如果第一次加载页面,则CKEditor工作正常,并且可以编辑编辑器的值。点击正在调用以下函数的按钮“ajax”后(光标必须位于编辑器字段中):

函数ajax\u call(){
var html=“test1

test2

test3

jQuery(document).ready(function(){ckEditor('textarea');});”; $.post(“/echo/html/”,{html:html},函数(数据){ jQuery('#target').html(数据); }); }

无法单击IE11中的文本来编辑该值。单击文本之外或文本左侧可再次启用编辑器。

看起来像是在IE中启动CKEDITOR后创建了新的textarea。虽然我只是尝试直接在CKEDITOR实例上设置数据,但效果很好,而不是创建新的textarea标记

 function ajax_call() {

    var html = "<p>test 4</p><p>test 5</p><p>test 6</p>";

    $.post("/echo/html/", { html: html }, function(data){
        //jQuery('#target').html(data); <-- Removed from original
        CKEDITOR.instances['textarea'].setData(data)// <-- Added

    });
}            

function ckEditor(id) {
    CKEDITOR.replace(id, {
        language : 'de',
    });
}

jQuery(document).ready(function() {
    ckEditor('textarea');

});
函数ajax\u call(){
var html=“测试4

测试5

测试6

”; $.post(“/echo/html/”,{html:html},函数(数据){ //jQuery('#target').html(数据);
 function ajax_call() {

    var html = "<p>test 4</p><p>test 5</p><p>test 6</p>";

    $.post("/echo/html/", { html: html }, function(data){
        //jQuery('#target').html(data); <-- Removed from original
        CKEDITOR.instances['textarea'].setData(data)// <-- Added

    });
}            

function ckEditor(id) {
    CKEDITOR.replace(id, {
        language : 'de',
    });
}

jQuery(document).ready(function() {
    ckEditor('textarea');

});