相关疑难解决方法(0)

删除CKEdit实例

我似乎无法根据文档销毁CKEdit的实例.

考虑以下:

<input name="txt1" type="text" id="txt1" /><br />
<a href="javascript:void(0);" onclick="create()">Create</a><br />
<a href="javascript:void(0);" onclick="destroy()">Destroy</a>
<script type= "text/javascript" >
<!--
function create() {
    var hEd = CKEDITOR.instances['txt1'];
    if (hEd) {
        CKEDITOR.remove(hEd);
    }
    hEd = CKEDITOR.replace('txt1');
}
function destroy(){
    var hEd = CKEDITOR.instances['txt1'];
    if (hEd) {
        CKEDITOR.remove(hEd);
    }
}
-->
</script>
Run Code Online (Sandbox Code Playgroud)

当destroy()运行时,CKEDITOR.remove(hEd); 被称为.多次单击create()会在屏幕上生成多个CKEditor实例,但它们的实例不再出现在CKEDITOR.instances中.

我错过了什么吗?

fckeditor ckeditor

21
推荐指数
1
解决办法
4万
查看次数

如何使用jQuery销毁内联CKEditor

让我们说这是我的代码:

<div class="editor" contenteditable></div>

// This is working for me
$('.editor').click(function(){
   $(this).ckeditor();
});

// This is the problem
$('.editor').on('focusout', function(){
   $(this).ckeditorDestroy(); // What will destroy ckeditor?
});
Run Code Online (Sandbox Code Playgroud)

我知道这个功能不存在,但我没有发现什么工作?

jquery ckeditor destroy

6
推荐指数
1
解决办法
5626
查看次数

标签 统计

ckeditor ×2

destroy ×1

fckeditor ×1

jquery ×1