Vue 之vue-ueditor-wrap富文本编辑器自定义按钮
一、效果图
二、代码
<vue-ueditor-wrap v-model="form.content" @ready="ready" :config="editorConfig" @beforeInit="addImageButton" style="line-height: initial;"></vue-ueditor-wrap>
import VueUeditorWrap from 'vue-ueditor-wrap'
addImageButton(editorId){ window.UE.registerUI('myinsertimage', (editor, uname) => { const btn = new window.UE.ui.Button({ name: uname, title: '单图上传', cssRules: '按钮样式', onclick: function(){ _this.img_type = 'ueditor' _this.$refs['image_child'].$emit('show_image_dialog') }) return btn }) }