基于 Vue3 + Quill 封装的富文本编辑器组件。
yarn add @vusui/editor
npm i @vusui/editor -S
// main.ts
import { VusuiEditor } from '@vusui/editor';
import '@vusui/editor/lib/style.css';
app.use(VusuiEditor);
import { VusuiEditor } from '@vusui/editor';
import '@vusui/editor/lib/style.css';
export default {
components: {
VusuiEditor
}
};
<template>
<vusui-editor :options="editor.options" v-model:content="editor.content" />
</template>
<script setup lang="ts">
import { reactive } from 'vue';
const editor = reactive({
// 内容
content: '',
// quill 配置参数
options: {
...
}
});
</script>
Copyright (c) 2017-present, Vusui