销毁与恢复

可以使用editor.destroy()editor.undestroy()和恢复编辑器。如下代码:

var editor = new wangEditor("div1");
editor.create();

$("#btn1").click(function () {
    // 销毁编辑器
    editor.destroy();
});

$("#btn2").click(function () {
    // 恢复编辑器
    editor.undestroy();
});

文章导航