ant.vue富文本编辑器
编辑器 (SMEditor)
Rich text editor based on Vue.js 2.0 and shimo Docs style, lightweight, fast and elegant.
基于Vue.js 2.0和shimo Docs样式的富文本编辑器,轻巧,快速,优雅。
用 (use)
yarn install smeditor
import SMEditor from 'smeditor'
Vue.use(SMEditor)
components: {
'smeditor': SMEditor
}
<smeditor :config='config'></smeditor>
配置 (config)
const config = {
uploadUrl: '',
uploadName: '',
uploadParams: {},
uploadCallback: (data) => {
console.log(data)
return 'blob:https://fiddle.jshell.net/00a0b0b4-d19a-4860-9796-137692aef36f'
},
uploadFailed: (err) => {
console.log(err)
}
}
热键 (hot key)
Ctrl + S 保存
Ctrl + P 预览(新窗口)
本地 (local)
npm run dev
npm run build
npm run gp
翻译自: https://vuejsexamples.com/rich-text-editor-based-on-vue-js-2-0-and-shimo-docs-style/
ant.vue富文本编辑器