destroy error in vue
See original GitHub issueI use tinymce 4.7.1 in my vue project
This bug occurs when I leave this page,
destroyed(){ tinymce.get('articleEditor').destroy(); }
tinymce Initialization function
tinymce.init({ selector: '#noticeEditor', branding: false, elementpath: false, encoding: 'html', height: 500, language: 'zh_CN.GB2312', menubar: 'edit insert view format table tools', theme: 'modern', plugins: [ 'advlist autolink lists link image charmap print preview hr anchor pagebreak imagetools', 'searchreplace visualblocks visualchars code fullscreen fullpage', 'insertdatetime media nonbreaking save table contextmenu directionality', 'emoticons paste textcolor colorpicker textpattern imagetools codesample' ], toolbar1: ' newnote print fullscreen preview | undo redo | insert | styleselect | forecolor backcolor bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image emoticons media codesample', autosave_interval: '20s', image_advtab: true, table_default_styles: { width: '100%', borderCollapse: 'collapse' }, init_instance_callback: function (editor) { if (that.$route.params.noticeMsg) { editor.setContent(that.$route.params.noticeMsg.msg) } } });
Current behavior: I put the previously labeled data in the localStorage, then tinymce.get (‘editor’).SetContent (), and then leave the page and make a mistake
## but If I SetContent () and then click on the edit box, don’t need to change the content, Will not be wrong when leave.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
destroyed(){ let content = '' tinymce.get('noticeEditor').setContent(content) tinymce.get('noticeEditor').destroy(); }
I add the above code to avoid the error, but I don’t know whyI have the same problem, how did you solve it