Hey y’all I’ve been struggling to try to get quill working. Recently switched to trying to use VueQuill with limited success.
I can get the editor to appear, and the user can type in it, but none of the toolbar buttons work.
A few things:
- I’m trying to get the toolbar to work
- The next step is to try to add modules like the quill-html-edit-button, but I’m not sure how to add multiple modules
Heres what I have so far:
<script setup lang="ts">
import { ref, defineComponent } from 'vue'
import { QuillEditor, Delta } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
import htmlEditButton from "quill-html-edit-button";
import {useRichTextConfiguration} from "~/composables/configuration/widget/rich-text-configuration";
import BlotFormatter from 'quill-blot-formatter'
const props = defineProps({
widgetId: {
type: String,
required: true
}
})
const {widgetId} = toRefs(props)
const {
backgroundColor,
customCss,
html
} = useRichTextConfiguration(widgetId)
const content = ref<Delta | null>(html.value)
const modules = [
{
name: 'htmlEditButton',
module: htmlEditButton,
options: {/* options */}
}
]
</script>
<template>
<QuillEditor v-model:content="html" content-type="html" theme="snow" :toolbar="['bold', 'italic', 'underline', 'image']" :modules="modules"/>
</template>