npm install vue-quill-editor複製代碼
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)複製代碼
<template>
<div class="quill">
<h1>Vue-Quill-Editor</h1>
<quill-editor v-model="content"></quill-editor>
</div>
</template>
<script>
export default {
data () {
return {
content: '<p>example content</p>'
}
}}
</script>複製代碼
Vue-Quill-Editor是基於 Quill、適用於 Vue 的富文本編輯器,支持服務端渲染和單頁應用。
css
github地址:github.com/surmon-chin…vue