Skip to content

Commit 22c79cd

Browse files
authored
Merge pull request nubasedev#296 from mmomtchev/readme-default-commands
add getDefaultToolbarCommands to the readme
2 parents df0b073 + d04bc46 commit 22c79cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The types are described below
9191
This allows for passing class names to each of the inner components of React-mde. Classes defined in the *classes* prop
9292
follow the specification of [Jed Watson's classNames project](https://github.com/JedWatson/classnames).
9393
- **commands?: Record<string, Command>**: An object with string properties representing keys, and a Command object as value for each key. These are custom commands. Commands are explained in more details below.
94-
- **toolbarCommands?: string[][]**: Array of array of strings, indicating which commands should be displayed. Each outer array is a group. Example: `[["code", "bold"], ["italic"]]`
94+
- **toolbarCommands?: string[][]**: Array of array of strings, indicating which commands should be displayed. Each outer array is a group. Example: `[["code", "bold"], ["italic"]]`. The default list can be obtained with `import { getDefaultToolbarCommands } from 'react-mde', getDefaultToolbarCommands()`
9595
- **generateMarkdownPreview: (markdown: string) => Promise<string | ReactElement>;**: Function that should return a Promise to the generated HTML or a React element for the preview. If this `prop` is falsy, then no preview is going to be generated.
9696
- **getIcon?: (commandName: string) => React.ReactNode }** An optional set of button content options, including an `iconProvider` to allow custom icon rendering.
9797
options. It is recommended to [inspect the layouts source code](https://github.com/andrerpena/react-mde/tree/master/src/components-layout) to see what options can be passed to each

0 commit comments

Comments
 (0)