This commit is contained in:
yanmao 2022-01-07 00:21:37 +08:00
parent 614131e810
commit 9453ea48b7
2 changed files with 62 additions and 0 deletions

View File

@ -52,6 +52,37 @@ items: [
If the default configuration is found through the `name` attribute, the `type` attribute will not be overwritten. If the configured `name` is not part of the default configuration, it will be processed according to the custom button
## pop-up windows
Follow the mouse to drag the selected toolbar pop-up box
```ts
import {ToolbarPlugin} from'@aomao/toolbar';
import type {ToolbarOptions} from'@aomao/toolbar';
const toolbarOptions: ToolbarOptions = {
popup: {
items: [
['undo','redo'],
{
icon:'text',
items: [
'bold',
'italic',
'strikethrough',
'underline',
'backcolor',
'moremark',
],
},
],
},
};
new Engine(...,{ config: {
[ToolbarPlugin.pluginName]: toolbarOptions,
} })
```
## Collapse
Usually used to configure the card drop-down box

View File

@ -56,6 +56,37 @@ items: [
如果通过 `name` 属性找到了默认配置,那么 `type` 属性是不会被覆盖的。如果配置的`name`不属于默认配置的一部分,就按照自定义按钮处理
## 弹出框
跟随鼠标拖蓝选中后的工具栏弹出框
```ts
import { ToolbarPlugin } from '@aomao/toolbar';
import type { ToolbarOptions } from '@aomao/toolbar';
const toolbarOptions: ToolbarOptions = {
popup: {
items: [
['undo', 'redo'],
{
icon: 'text',
items: [
'bold',
'italic',
'strikethrough',
'underline',
'backcolor',
'moremark',
],
},
],
},
};
new Engine(...,{ config: {
[ToolbarPlugin.pluginName]: toolbarOptions,
} })
```
## Collapse
通常用于配置卡片下拉框