|
1 | 1 | import React from 'react'; |
| 2 | +import { ContextStore, ExecuteCommandState } from '../Context'; |
| 3 | +import { insertTextAtPosition } from '../utils/InsertTextAtPosition'; |
2 | 4 | import { bold } from './bold'; |
3 | 5 | import { code, codeBlock } from './code'; |
| 6 | +import { comment } from './comment'; |
| 7 | +import { divider } from './divider'; |
| 8 | +import { fullscreen } from './fullscreen'; |
| 9 | +import { group } from './group'; |
| 10 | +import { hr } from './hr'; |
| 11 | +import { image } from './image'; |
4 | 12 | import { italic } from './italic'; |
5 | 13 | import { link } from './link'; |
6 | | -import { unorderedListCommand, orderedListCommand, checkedListCommand } from './list'; |
| 14 | +import { checkedListCommand, orderedListCommand, unorderedListCommand } from './list'; |
| 15 | +import { codeEdit, codeLive, codePreview } from './preview'; |
7 | 16 | import { quote } from './quote'; |
8 | | -import { hr } from './hr'; |
| 17 | +import { strikethrough } from './strikeThrough'; |
9 | 18 | import { title } from './title'; |
10 | 19 | import { title1 } from './title1'; |
11 | 20 | import { title2 } from './title2'; |
12 | 21 | import { title3 } from './title3'; |
13 | 22 | import { title4 } from './title4'; |
14 | 23 | import { title5 } from './title5'; |
15 | 24 | import { title6 } from './title6'; |
16 | | -import { comment } from './comment'; |
17 | | -import { group } from './group'; |
18 | | -import { divider } from './divider'; |
19 | | -import { codePreview, codeEdit, codeLive } from './preview'; |
20 | | -import { fullscreen } from './fullscreen'; |
21 | | -import { image } from './image'; |
22 | | -import { strikethrough } from './strikeThrough'; |
23 | | -import { insertTextAtPosition } from '../utils/InsertTextAtPosition'; |
24 | | -import { ContextStore, ExecuteCommandState } from '../Context'; |
25 | 25 |
|
26 | 26 | export interface CommandOrchestrator { |
27 | 27 | executeCommand(command: ICommand): void; |
@@ -84,7 +84,11 @@ const getCommands: () => ICommand[] = () => [ |
84 | 84 | italic, |
85 | 85 | strikethrough, |
86 | 86 | hr, |
87 | | - title, |
| 87 | + group([title1, title2, title3, title4, title5, title6], { |
| 88 | + name: "title", |
| 89 | + groupName: "title", |
| 90 | + buttonProps: { "aria-label": "Insert title", title: "Insert title" }, |
| 91 | + }), |
88 | 92 | divider, |
89 | 93 | link, |
90 | 94 | quote, |
@@ -163,7 +167,6 @@ class TextAreaCommandOrchestrator implements CommandOrchestrator { |
163 | 167 | } |
164 | 168 |
|
165 | 169 | export { |
166 | | - // Toolbars. |
167 | 170 | title, |
168 | 171 | title1, |
169 | 172 | title2, |
@@ -196,3 +199,4 @@ export { |
196 | 199 | TextAreaCommandOrchestrator, |
197 | 200 | TextAreaTextApi, |
198 | 201 | }; |
| 202 | + |
0 commit comments