theroozbeh / vue-tinymce-editor

This a component provides use of tinymce for vue developers
223 stars 71 forks source link

content of editor is empty when mounted #29

Open kazusa0106 opened 6 years ago

kazusa0106 commented 6 years ago

code: image after click the button: image

but this works image image

so I must set the content after mounted ?

Andre0711er commented 6 years ago

Hi.

I have the same problem. If I using "mounted", i need to add a timeout from 1000 ms before loading content to correctly visible in TinyMCE Editor.

Is this a bug?

davutkara commented 6 years ago

I have the same problem too.

AndreiSoroka commented 6 years ago

I have this problem too

DavidMente commented 5 years ago

I listen to the editorInit event and set content afterwards. That seems to work reliably:

` <tinymce :id="id" :toolbar1="toolbar1" :plugins="plugins" :other_options=other_options v-model="value" @editorInit="editorInit" ref="tm"

...

methods: { editorInit() { this.$refs.tm.editor.setContent(this.value); } } `