鍍金池/ 問答/HTML/ Vue中quill-editor如何在頭部添加自定義按鈕?

Vue中quill-editor如何在頭部添加自定義按鈕?

在Vue中食用了quill-editor,在data中定義了頭部的toolbar,如下:

    toolbar: {
          container: [
            ['bold', 'italic', 'underline', 'strike'],
            ['blockquote', 'code-block'],
            [{'header': 1}, {'header': 2}],
            [{'list': 'ordered'}, {'list': 'bullet'}],
            [{'indent': '-1'}, {'indent': '+1'}],
            [{'size': ['small', false, 'large', 'huge']}],
            [{'header': [1, 2, 3, 4, 5, 6, false]}],
            [{'color': []}, {'background': []}],
            [{'align': []}],
            ['clean'],
            ['link', 'image', 'video']
          ],
          handlers: {
            'image': function () {
              document.getElementById('QEFileTxt').click()
            }
          }
        },
        

怎么在末尾添加自定義按鈕并綁定事件呢?
圖片描述

回答
編輯回答
枕邊人

你是使用的vue-quill-editor嗎,官網(wǎng)有自定義按鈕的代碼示例。

2017年2月27日 00:17