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
    })
}        

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM