Aug 21, 2022
3
Level 1
tinyMCE v-model vue laravel 9
He, I'm trying to get my Tiny MCE editor to work, but there seem to be some problems with the combination of the v-model and the editor. so nothing is shown or the v-model variable is not updated on an input. Is there any kinda Hack you can do that is going to work?
My Component is like that
<template>
<div v-html="message">
</div>
<div id="test">
</div>
<div>
<editor ref="editor"
v-model="message"
:api-key="$page.props.tinymce_api_key"
:init="{
plugins: [
'lists link image paste help wordcount'
],
toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | help'
}"
/>
</div>
</template>
<script>
import Editor from '@tinymce/tinymce-vue'
import {ref} from "vue";
export default {
name: "FrontPage",
components: {
'editor': Editor,
},
setup() {
let message
let editor = ref(null)
return {
message, editor
}
}
}
</script>
Please or to participate in this conversation.