|
@@ -95,9 +95,44 @@ export default {
|
|
|
mode: 'default'
|
|
mode: 'default'
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- // 工具栏:不指定 toolbarKeys,使用 wangEditor 5 默认全部已注册菜单
|
|
|
|
|
- // (basic-modules + list-module + table-module + upload-image-module + code-highlight 等)
|
|
|
|
|
- const toolbarConfig = {}
|
|
|
|
|
|
|
+ // 工具栏:列出 wangEditor 5 已注册的全部有效菜单 key
|
|
|
|
|
+ // 注:wangEditor 把删除线菜单命名为 "through","mergeCells" 不是注册菜单
|
|
|
|
|
+ const toolbarConfig = {
|
|
|
|
|
+ toolbarKeys: [
|
|
|
|
|
+ 'undo', 'redo',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'headerSelect',
|
|
|
|
|
+ 'bold', 'italic', 'underline', 'through',
|
|
|
|
|
+ 'code', 'sub', 'sup',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'color', 'bgColor',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'fontSize', 'fontFamily',
|
|
|
|
|
+ 'lineHeight',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyJustify',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'bulletedList', 'numberedList',
|
|
|
|
|
+ 'indent', 'delIndent',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'insertImage', 'uploadImage', 'deleteImage', 'editImage',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'insertTable', 'tableFullWidth', 'deleteTable',
|
|
|
|
|
+ 'insertTableRow', 'deleteTableRow',
|
|
|
|
|
+ 'insertTableCol', 'deleteTableCol',
|
|
|
|
|
+ 'tableHeader',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'insertLink', 'editLink', 'unLink',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'blockquote', 'codeBlock', 'todo',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'divider', 'splitLine', 'clearStyle',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'emotion',
|
|
|
|
|
+ '|',
|
|
|
|
|
+ 'fullScreen', 'preview'
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
this.toolbar = createToolbar({
|
|
this.toolbar = createToolbar({
|
|
|
editor: this.editor,
|
|
editor: this.editor,
|