'I got error Cannot convert undefined or null to object adding QuillBetterTable into QuillEditor
In laravel 9 with Inertiajs/vuejs 3 I need to add table into vueup/vue-quill editor and looking at this article https://vueup.github.io/vue-quill/guide/modules.html#example
Adding QuillBetterTable support into my app:
<quill-editor
:options="editorOptions"
:modules="modules"
theme="snow"
:disabled="false"
v-model:content="descriptionFormEditor.description"
text-change="textChangeDescription"
editorChange="editorChangeDescription"
contentType="html"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
@textChange="onTextChange($event)"
>{{ descriptionFormEditor.description }}
</quill-editor>
...
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css';
import QuillBetterTable from 'quill-better-table' // https://github.com/soccerloway/quill-better-table
...
let editorOptions = ref(
[['better-table', 'bold', 'italic'], ['link', 'image']]
)
let modules = ref({
table: false, // disable table module
'better-table': {
operationMenu: {
items: {
unmergeCells: {
text: 'Another unmerge cells name'
}
},
color: {
colors: ['#fff', 'red', 'rgb(0, 0, 0)'], // colors in operationMenu
text: 'Background Colors' // subtitle
}
}
},
keyboard: {
bindings: QuillBetterTable.keyboardBindings
}
}
)
...
...
return
editorOptions,
modules,
...
But I got next error : https://prnt.sc/EIKGal7poJyT
Any hints what is it and how it can be fixed ?
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
