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.
v-model? - DmytrykinitialValueobject, and pass a string? - Dmytryk