@alasq/quill-wrapper-vue
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

quill-wrapper-vue

描述

将vue组件转换成quill富文本编辑器的 formats

使用

import Quill from "quill";
import "quill/dist/quill.snow.css";
import wrapper from "quill-wrapper-vue";
import HelloWorld from "./components/HelloWorld.vue"
Quill.register(wrapper(HelloWord),true);
let editor=new Quill('.editor',{
  theme:'snow'
})
editor.insertEmbed(0,HelloWorld.name,{msg:'Hello Vue 3 + TypeScript + Vite'})

样例

注意

  1. vue 组件中的scoped样式会失效,最好改成行内样式,或者全局样式
  2. 由于使用的是 BlockEmbed 来封装的,只能达到显示效果,后面会考虑如何让getContents拿到数据

Readme

Keywords

Package Sidebar

Install

npm i @alasq/quill-wrapper-vue

Weekly Downloads

2

Version

0.0.3

License

none

Unpacked Size

4.47 kB

Total Files

6

Last publish

Collaborators

  • alasq