element-tiptap
element-tiptap copied to clipboard
Fresh install Cannot read property 'options' of undefined error
Hi, After the fresh install I get error:
client.js?06a0:103 TypeError: Cannot read property 'options' of undefined
at VueComponent.value (element-tiptap.esm.js?4ccc:20)
at VueComponent.value (element-tiptap.esm.js?4ccc:20)
at VueComponent.value (element-tiptap.esm.js?4ccc:20)
at VueComponent.value (element-tiptap.esm.js?4ccc:20)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1863)
at callHook (vue.runtime.esm.js?2b0e:4235)
at Object.insert (vue.runtime.esm.js?2b0e:3158)
at invokeInsertHook (vue.runtime.esm.js?2b0e:6390)
at VueComponent.patch [as __patch__] (vue.runtime.esm.js?2b0e:6609)
at VueComponent.Vue._update (vue.runtime.esm.js?2b0e:3963)
My plugin code:
import Vue from 'vue'
import { ElementTiptapPlugin } from 'element-tiptap'
import 'element-tiptap/lib/index.css'
Vue.use(ElementTiptapPlugin, {
lang: 'en', // see i18n
spellcheck: true, // can be overwritten by editor prop
})
same here !
Minimal setup for partial import that worked for me:
npm install --save element-tiptap
npm install --save element-ui
In a component file (e.g. Editor.vue):
- lang attribute
- Doc, Text, and Paragraph extensions
<template>
<el-tiptap v-model="content" lang="en" :extensions="extensions"></el-tiptap>
</template>
<script>
import { ElementTiptap, Doc, Text, Paragraph } from 'element-tiptap'
export default {
components: {
'el-tiptap': ElementTiptap
},
data() {
return {
content: '',
extensions: [new Doc(), new Text(), new Paragraph()]
}
}
}
</script>