TinyMCE error: Cannot read property 'body' of null

Viewed 758

This how I am initializing it. The problem comes in when opening on the second time. And this only happens in Chrome. Mozilla Firefox works well.

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"
});
1 Answers

I had the same problem after chrome update(version 85) , but this line before tinyMCE.init works to me:

tinyMCE.EditorManager.editors = [];

or

tinyMCE.editors = [];
Related