TinyMCE 4 - remove() or destroy()

后端 未结 15 593
抹茶落季
抹茶落季 2020-12-25 12:22

I am using TinyMCE editor. I want to remove or destroy tinymce editors (Page contain more then one editor). Also remove classes and IDs added by tinyMCE.

Bu

15条回答
  •  隐瞒了意图╮
    2020-12-25 12:55

    If you have multiple Instances of TinyMCE you can use following code snippet to close every instance of TinyMCE:

    for (var i = tinymce.editors.length - 1 ; i > -1 ; i--) {
        var ed_id = tinymce.editors[i].id;
        tinyMCE.execCommand("mceRemoveEditor", true, ed_id);
    }
    

    I use it before the Ajax Content is loaded.

提交回复
热议问题