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