Top

Editors


npm i @ckeditor/ckeditor5-vue

Inside Your template tags add

<ckeditor :editor="editor"  v-model="editorData"><ckeditor>

Inside Your script tags add

import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import { ref } from "vue"
const ckeditor = CKEditor.component
const editor = ClassicEditor
const editorData = ref<string>('<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>')
npm i vue3-quill

In your main.ts file all the following code:

import { quillEditor } from "vue3-quill";
.use(quillEditor)

Inside Your template tags add

<quill-editor
v-model:value="state.content" 
:options="state.editorOption"
@change="onEditorChange($event)" />

Inside Your script tags add

import { reactive } from 'vue'
const state = reactive({
    content: '

Some initial content

', _content: '', editorOption: { placeholder: 'core', }, disabled: false }) const onEditorChange = (html: string) => { state._content = html } setTimeout(() => { state.disabled = true }, 2000)