Skip to content

Commit 5614c9a

Browse files
committed
doc: update README.md #197
1 parent 83d78a4 commit 5614c9a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ export interface IMarkdownEditor extends ReactCodeMirrorProps {
249249
/** Whether to enable scrolling */
250250
enableScroll?: boolean;
251251
/** Tool display settings. */
252-
toolbars?: IToolBarProps['toolbars'];
252+
toolbars?: Commands[];
253253
/** The tool on the right shows the settings. */
254-
toolbarsMode?: IToolBarProps['toolbars'];
254+
toolbarsMode?: Commands[];
255+
/** Tool display filter settings. */
256+
toolbarsFilter?: (tool: Commands, idx: number) => boolean;
255257
/** Toolbar on bottom */
256258
toolbarBottom?: boolean;
257259
/** Option to hide the tool bar. */
@@ -279,7 +281,8 @@ export interface MarkdownEditorRef {
279281
editor: React.RefObject<ReactCodeMirrorRef> | null;
280282
preview?: React.RefObject<MarkdownPreviewRef> | null;
281283
}
282-
export interface IToolBarProps<T = keyof typeof defaultCommands | ICommand> extends ToolBarProps {
284+
export declare type Commands = keyof typeof defaultCommands | ICommand;
285+
export interface IToolBarProps<T = Commands> extends ToolBarProps {
283286
className?: string;
284287
editorProps: IMarkdownEditor;
285288
mode?: boolean;
@@ -327,7 +330,6 @@ export declare const defaultCommands: {
327330
export declare const getCommands: () => ICommand[];
328331
export declare const getModeCommands: () => ICommand[];
329332
export declare const defaultTheme: import("@codemirror/state").Extension;
330-
331333
```
332334

333335
### Development

0 commit comments

Comments
 (0)