Update config.tsx
This commit is contained in:
parent
7684402502
commit
1a9b90698b
|
@ -86,6 +86,7 @@ import {
|
||||||
ToolbarComponent,
|
ToolbarComponent,
|
||||||
fontFamilyDefaultData,
|
fontFamilyDefaultData,
|
||||||
} from '@aomao/toolbar';
|
} from '@aomao/toolbar';
|
||||||
|
import type { ToolbarOptions } from '@aomao/toolbar';
|
||||||
|
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import Loading from '../loading';
|
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> = {
|
export const pluginConfig: Record<string, PluginOptions> = {
|
||||||
[ToolbarPlugin.pluginName]: {
|
[ToolbarPlugin.pluginName]: 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',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
[Table.pluginName]: tableOptions,
|
[Table.pluginName]: tableOptions,
|
||||||
[MarkRange.pluginName]: markRangeOptions,
|
[MarkRange.pluginName]: markRangeOptions,
|
||||||
[Italic.pluginName]: italicOptions,
|
[Italic.pluginName]: italicOptions,
|
||||||
|
|
Loading…
Reference in New Issue