tinymce / tinymce-vue

Official TinyMCE Vue component
MIT License
2.08k stars 208 forks source link

Uncaught TypeError: Cannot read properties of null (reading 'init') #390

Closed newalway closed 4 months ago

newalway commented 1 year 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>

Capture

pakage.json "vue": "^3.2.31" "@tinymce/tinymce-vue": "^5.1.0",

Laravel 9 + ViteJS + InertiaJS

TinyITAdmin commented 1 year ago

Ref: INT-3229

tiny-stale-bot commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Please comment if you wish to keep this issue open or it will be closed in 7 days.

tiny-stale-bot commented 4 months ago

This issue was closed because it has been stalled for 7 days with no activity.