我正在使用 CKEditor 将我的 textareas 更改为所见即所得。一切正常,除非我通过 Ajax 调用加载内容。然后我的 CKEditor 没有加载。
我一直在寻找解决方案,但找不到任何对我有用的解决方案。
我的 Ajax 调用基本上是这样的:
$.ajax({
    type: "POST",
    url: url,
      success: function(data) {
            $('#content').html(data);
            $('.ckeditor').ckeditor();
      }
});
如您所见,我尝试使用函数ckeditor()以编程方式加载 CKEditor。但这给了我以下错误:
火狐 说:
$(".ckeditor").ckeditor 不是函数
IE 说:
对象不支持属性或方法“ckeditor”
当通过 Ajax 调用加载内容时,还有其他方法可以按类名加载 CKEditor 吗?