简介 Intro
Vue-html5-editor是一个Vue的富文本编辑器插件,简洁灵活可扩展,适用于vue2.0以上版本,支持IE11.
Vue-html5-editor is an html5 wysiwyg editor for vue,easy and flexible,compatible with Vue.js 2.0+,support IE11.
安装 Installation
Npm
npm installvue-html5-editor --save-dev
引入并安装作为全局组件
import and install as global component
import Vue from 'vue'
import VueHtml5Editor from 'vue-html5-editor'
Vue.use(VueHtml5Editor,options);
同样你也可以作为局部组件使用,方便在不同的场景里使用不同的配置.
const editor1 = new VueHtml5Editor(options1)
const app1 = new Vue({
components:{
editor1
}
})
const editor2 = new VueHtml5Editor(options2)
const app2 = new Vue({
components:{
editor2
}
})
浏览器直接使用 browser
通过全局变量VueHtml5Editor来安装.
Install using global variable VueHtml5Editor.
Vue.use(VueHtml5Editor, options)
使用说明 Usage
模板代码如下:
template code as follows:
options
Vue.use(VueHtml5Editor, {
// 全局组件名称,使用new VueHtml5Editor(options)时该选项无效
// global component name
name: "vue-html5-edi