Open newalway opened 9 months ago
In file Index.vue
<script setup> import { defineAsyncComponent , h, ref ,inject,watch ,provide,computed } from 'vue' const Editor = defineAsyncComponent(() => import ('@tinymce/tinymce-vue')) </script> <template> <div class="mb-2"> <Editor v-model="form.description" api-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" :init="{ height: 500, menubar: false, plugins: [ 'lists','link','image','charmap','preview','anchor','searchreplace','visualblocks', 'fullscreen','insertdatetime','media','table','help','wordcount','code' ], toolbar:[ 'undo redo | casechange blocks | bold italic backcolor | \ alignleft aligncenter alignright alignjustify | \ bullist numlst numlist checklist outdent indent | removeformat | code table help '], keep_styles: false, style_formats_merge: true, style_formats: [ { title: 'Unstyled list', selector: 'ul,ol', classes: 'list-none' } ] }" initial-value="Welcome to TinyMCE Vue" /> </div> </template>
pakage.json "vue": "^3.2.31" "@tinymce/tinymce-vue": "^5.1.0",
Laravel 9 + ViteJS + InertiaJS
Ref: INT-3229
In file Index.vue
pakage.json "vue": "^3.2.31" "@tinymce/tinymce-vue": "^5.1.0",
Laravel 9 + ViteJS + InertiaJS