I connected tinymce to vue.js code template:

<editor :name="name" :api-key="tinymceconfig.config.apikey" :init="tinymceconfig.config" v-if="tinymceconfig" v-model="value" > </editor> 

script code:

 export default { props: { initialValue: {}, name: {} }, data() { return { tinymceconfig: null, value: this.initialValue } }, methods: { loadInitialData() { axios.get('/tinymci/load').then((response) => { this.tinymceconfig = response.data.tinymceconfig; }).catch((error) => console.log(error)); } }, components: { 'editor': Editor }, mounted() { this.loadInitialData(); }, } 

In the template, transfer data from the server via: props Everything works fine, but as soon as I save something like this <p><span style="color: #545b62; font-family: Roboto, 'Open Sans', 'Helvetica Neue', sans-serif; font-size: 14px; letter-spacing: 0.7px; background-color: #ffffff;">- 8 images maximum</span></p> When outputting Template falls. How to fix this error? I understand that you need to screen, tried to add via v-html but does not work.

  • Try wrapping your string in quotes around `` - Dmytryk
  • Inserted, wrapping, does not help - Dima Svobin
  • Do you pass this line to v-model ? - Dmytryk
  • @ Dmytryk yes in the model - Dima Svobodin
  • Probably, you need to watch the docks of the module. Maybe something is wrong with the coming settings. Why do you have an initialValue object, and pass a string? - Dmytryk

0