【问题标题】:TinyMCE error: Cannot read property 'body' of nullTinyMCE 错误:无法读取 null 的属性“正文”
【发布时间】:2020-09-19 13:22:47
【问题描述】:

这就是我初始化它的方式。第二次打开时出现问题。而这只发生在 Chrome 中。 Mozilla Firefox 运行良好。

tinyMCE.init({
          mode : "exact",
          elements : "email_content",
          theme : "advanced",
          theme_advanced_resizing : true,
          plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
          theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|formatselect,fontselect,fontsizeselect",
          theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,code,|,forecolor,backcolor"
});

【问题讨论】:

    标签: tinymce


    【解决方案1】:

    在 chrome update(version 85) 之后我遇到了同样的问题,但是 tinyMCE.init 之前的这一行对我有用:

    tinyMCE.EditorManager.editors = [];
    

    tinyMCE.editors = [];
    

    【讨论】:

    • 不幸的是,我无法使用 TinyMCE 版本 4.3.13 以这种方式解决问题。我之前尝试过 tinyMCE.remove() 应该有相同的效果,但无济于事。任何想法 - 除了升级?
    • 我们能够通过此修复解决我们的问题。但是 TinyMCE 3.8 版是我们在产品中使用的版本。
    • 这对我有用 >>> tinyMCE.editors = [];
    猜你喜欢
    • 2021-06-08
    • 2015-05-23
    • 1970-01-01
    • 1970-01-01
    • 2021-11-07
    • 2016-11-27
    • 2017-06-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多