Update config.tsx

This commit is contained in:
yanmao 2021-12-31 01:14:24 +08:00
parent 7684402502
commit 1a9b90698b
1 changed files with 83 additions and 80 deletions

View File

@ -86,6 +86,7 @@ import {
ToolbarComponent,
fontFamilyDefaultData,
} from '@aomao/toolbar';
import type { ToolbarOptions } from '@aomao/toolbar';
import ReactDOM from 'react-dom';
import Loading from '../loading';
@ -309,87 +310,89 @@ export const lineHeightOptions: LineHeightOptions = {
},
};
export const toolbarOptions: ToolbarOptions = {
// popup: {
// items: [
// ['undo', 'redo'],
// {
// icon: 'text',
// items: [
// 'bold',
// 'italic',
// 'strikethrough',
// 'underline',
// 'fontsize',
// 'fontcolor',
// 'backcolor',
// 'moremark',
// ],
// },
// [
// {
// type: 'button',
// name: 'image-uploader',
// icon: 'image',
// },
// 'link',
// 'tasklist',
// 'heading',
// ],
// {
// icon: 'more',
// items: [
// {
// type: 'button',
// name: 'video-uploader',
// icon: 'video',
// },
// {
// type: 'button',
// name: 'file-uploader',
// icon: 'attachment',
// },
// {
// type: 'button',
// name: 'table',
// icon: 'table',
// },
// {
// type: 'button',
// name: 'math',
// icon: 'math',
// },
// {
// type: 'button',
// name: 'codeblock',
// icon: 'codeblock',
// },
// {
// type: 'button',
// name: 'orderedlist',
// icon: 'orderedlist',
// },
// {
// type: 'button',
// name: 'unorderedlist',
// icon: 'unorderedlist',
// },
// {
// type: 'button',
// name: 'hr',
// icon: 'hr',
// },
// {
// type: 'button',
// name: 'quote',
// icon: 'quote',
// },
// ],
// },
// ]
// }
};
export const pluginConfig: Record<string, PluginOptions> = {
[ToolbarPlugin.pluginName]: {
// popup: {
// items: [
// ['undo', 'redo'],
// {
// icon: 'text',
// items: [
// 'bold',
// 'italic',
// 'strikethrough',
// 'underline',
// 'fontsize',
// 'fontcolor',
// 'backcolor',
// 'moremark',
// ],
// },
// [
// {
// type: 'button',
// name: 'image-uploader',
// icon: 'image',
// },
// 'link',
// 'tasklist',
// 'heading',
// ],
// {
// icon: 'more',
// items: [
// {
// type: 'button',
// name: 'video-uploader',
// icon: 'video',
// },
// {
// type: 'button',
// name: 'file-uploader',
// icon: 'attachment',
// },
// {
// type: 'button',
// name: 'table',
// icon: 'table',
// },
// {
// type: 'button',
// name: 'math',
// icon: 'math',
// },
// {
// type: 'button',
// name: 'codeblock',
// icon: 'codeblock',
// },
// {
// type: 'button',
// name: 'orderedlist',
// icon: 'orderedlist',
// },
// {
// type: 'button',
// name: 'unorderedlist',
// icon: 'unorderedlist',
// },
// {
// type: 'button',
// name: 'hr',
// icon: 'hr',
// },
// {
// type: 'button',
// name: 'quote',
// icon: 'quote',
// },
// ],
// },
// ]
// }
},
[ToolbarPlugin.pluginName]: toolbarOptions,
[Table.pluginName]: tableOptions,
[MarkRange.pluginName]: markRangeOptions,
[Italic.pluginName]: italicOptions,