The vue component initializes the setting content to tinymce and reports an error.

problem description

vue component initializes the setting content to tinymce and reports an error

the environmental background of the problems and what methods you have tried

set timer, which can be solved.

    setTimeout(() => {
        tinymce.activeEditor.setContent("")
    }, 1000);

related codes

tinymce.init({
        selector: "-sharparticleEditor",
        branding: false,
        elementpath: false,
        height: 600,
        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"
        }
    });
    
    //  || 500ms()
    setTimeout(() => {
         tinymce.activeEditor.setContent(this.articleContent.content)
    }, 1000);

what result do you expect? What is the error message actually seen?

if the timer is not set, an error will be reported
the error code is as follows

[Vue warn]: Error in mounted hook: "TypeError: Cannot read property "parse" of undefined"
Mar.30,2021

tinymce supports Promise, so you can use the callback function to complete the operation

after the init is completed.
tinymce.init({
       // config
}).then( resolve=>{
        // init
        // doSomething
})

tinymce.init({
  selector: 'textarea',
  setup: function (editor) {
    editor.on('init', function (e) {
      console.log('');
    });
  }
});

because the init is not finished yet, it says

in this.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e41dbd-44980.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e41dbd-44980.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?