我正在使用CKEditor将我的textareas改成wysiwyg.一切正常,除非我通过Ajax调用加载内容.然后我的CKEditor没有加载.
我已经找到了解决方案,但找不到任何对我有用的解决方案.
我的Ajax调用基本上是这样的:
$.ajax({
type: "POST",
url: url,
success: function(data) {
$('#content').html(data);
$('.ckeditor').ckeditor();
}
});
Run Code Online (Sandbox Code Playgroud)
正如您所见,我试图使用函数ckeditor()以编程方式加载CKEditor.但这给了我以下错误:
FireFox说:
$(".ckeditor").ckeditor不是函数
IE说:
对象不支持属性或方法'ckeditor'
当通过Ajax调用加载内容时,是否还有其他方法可以通过类名加载CKEditor?
| 归档时间: |
|
| 查看次数: |
10202 次 |
| 最近记录: |