鍍金池/ 問答/HTML/ vue-quill-editor如何去掉上傳視頻的那個按鈕

vue-quill-editor如何去掉上傳視頻的那個按鈕

功能不需要上傳視頻按鈕,要怎么去掉呢

回答
編輯回答
不討囍

這需要你自定義toolbar。

 editorOption: {
                    modules: {
                        syntax: {
                            highlight: text => hljs.highlightAuto(text).value
                        },
                        toolbar: [
                            ['bold', 'italic', 'underline', 'strike'],        // toggled buttons
                            ['blockquote', 'code-block'],

                            [{'header': 1}, {'header': 2}],               // custom button values
                            [{'list': 'ordered'}, {'list': 'bullet'}],
                            [{'script': 'sub'}, {'script': 'super'}],      // superscript/subscript
                            [{'indent': '-1'}, {'indent': '+1'}],          // outdent/indent
                            [{'direction': 'rtl'}],                         // text direction

                            [{'size': ['small', false, 'large', 'huge']}],  // custom dropdown
                            [{'header': [1, 2, 3, 4, 5, 6, false]}],

                            [{'color': []}, {'background': []}],          // dropdown with defaults from theme
                            [{'font': []}],
                            [{'align': []}],
                            ['link', 'image', 'video', 'formula']//去除video即可
                        ]
                    },
                    placeholder: '編輯內(nèi)容...'
                }
2017年12月15日 21:39