TinyMCE 4 - remove() or destroy()

后端 未结 15 735
抹茶落季
抹茶落季 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:43

    I had the same problem. In v4 all suggestions above did not work for me, but this did:

    tinymce.remove("div.editable");
    
    ... regenerated HTML dynamicaly ...
    
    tinymce.init(...);
    

    I use inline editor:

    tinymce.init({
        selector: "div.editable",
        inline: true,
        plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste"
        ],
        menubar: false,
        toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"});
    

    Hope this helped

提交回复
热议问题