ajax调用后在IE11中不能编辑CKEditor
例如: 如果第一次加载页面,则CKEditor工作正常,并且可以编辑编辑器的值。点击正在调用以下函数的按钮“ajax”后(光标必须位于编辑器字段中):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(数据); }
函数ajax\u call(){
var html=“test1test2test3jQuery(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');
});