1. Quill
npm i -S quill @vueup/vue-quill
<QuillEditor v-model:content="content" contentType="html" theme="essential" />
2. Wangeditor
npm i -S @wangeditor/editor-for-vue@next
<template>
<div style="border: 1px solid black;">
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" />
<Editor style="height: 500px; overflow-y: hidden;" v-model="valueHtml" @onCreated="handleCreated" />
</div>
</template>
<script setup lang="ts">
import { shallowRef, ref } from 'vue';
import { Toolbar, Editor } from "@wangeditor/editor-for-vue"
import '@wangeditor/editor/dist/css/style.css'
const editorRef = shallowRef();
const valueHtml = ref('');
const handleCreated = (v) => {
editorRef.value = v
}
</script>