I have successfully installed the required packages:
npm i @ckeditor/ckeditor5-build-classic @ckeditor/ckeditor5-vue
Next, I integrated it into a component:
<template>
<div class="w-full h-[400px]">
<CKEditor
v-model="text"
:editor="ClassicEditor"
:config="config"/>
</div>
</template>
Here is the setup of the component:
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
import CKEditor from "@ckeditor/ckeditor5-vue";
const config = {
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }
]
}
}
const text = ref('')
The component is included in the root component:
<client-only>
<InputWysiwyg/>
</client-only>
However, when I open the page with the WYSIWYG editor, I receive a warning: "Component is missing template or render function" at the CKEditor element. What could be causing this issue?