question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

destroy error in vue

See original GitHub issue

I use tinymce 4.7.1 in my vue project This bug occurs when I leave this page, destroyed(){ tinymce.get('articleEditor').destroy(); } image 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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zaiMoecommented, Nov 28, 2017

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 why

0reactions
yuntian001commented, Nov 28, 2022

I have the same problem, how did you solve it

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue.js - Getting error Cannot read property 'destroy' of undefined
I am testing my project in vuejs using jest ...
Read more >
$destroy is not working in my situation - Get Help - Vue Forum
I have manually initiated and $mount a Vue component. When I try to $destroy it, the beforeDestroy() function is ran successfully.
Read more >
Destroy swallows errors in hooks #1105 - vuejs/vue-test-utils
What is actually happening? The hook stops at the error and the test does not know about the error. This is likely because...
Read more >
Destroying wrapper in Jest (w/ vue-test-utils) properly - GitLab
VTU has an access to the vm prop (which is a Vue instance), so VTU can check _isDestroyed property and throw an error...
Read more >
vue.js app.$destroy() does not remove app instance-Vue.js
Coding example for the question vue.js app.$destroy() does not remove app instance-Vue.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found