- **element**: The DOM element for the textarea to use. Defaults to the first textarea on the page.
- **status**: If set to `false`, hide the status bar. Defaults to `true`.
- Optionally, you can set an array of status bar elements to include, and in what order.
- **toolbar**: If set to `false`, hide the toolbar. Defaults to `true`.
- **toolbar**: If set to `false`, hide the toolbar. Defaults to the [array of icons](#toolbar-icons).
- **toolbarTips**: If set to `false`, disable toolbar button tips. Defaults to `true`.
- **autofocus**: If set to `true`, autofocuses the editor. Defaults to `false`.
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
@ -83,6 +83,39 @@ var simplemde = new SimpleMDE({
});
```
#### Toolbar icons
Below are the available toolbar icons, which can be reorganized however you like. "Name" is just the friendly name for reference purposes. "Action" is either a function or a URL to open. "Class" is the class given to the icon. "Tooltip" is the small tooltip that appears via the `title=""` attribute. The `Ctrl` and `Alt` in the title tags will be changed automatically to their Mac equivalents when needed. Additionally, you can add a separator between any icons by adding `"|"` to the toolbar array.
Name | Action | Class | Tooltip
---- | ------ | ----- | -----
Bold | toggleBold | fa fa-bold | Bold (Ctrl+B)
Italic | toggleItalic | fa fa-italic | Italic (Ctrl+I)
Blockquote | toggleBlockquote | fa fa-quote-left | Quote (Ctrl+')
Unordered List | toggleUnorderedList | fa fa-list-ul | Generic List (Ctrl+L)
Numbered List | toggleOrderedList | fa fa-list-ol | Numbered List (Ctrl+Alt+L)
Link | drawLink | fa fa-link | Create Link (Ctrl+K)
Image | drawImage | fa fa-picture-o | Insert Image (Ctrl+Alt+I)
Preview | togglePreview | fa fa-eye | Toggle Preview (Ctrl+P)
Markdown Guide | http://nextstepwebs.github.io/simplemde-markdown-editor/markdown-guide | fa fa-question-circle | Markdown Guide
Customize the toolbar using the `toolbar` option like:
```JavaScript
var simplemde = new SimpleMDE({
toolbar: [{
action: toggleBold,
className: "fa fa-bold",
title: "Bold (Ctrl+B)",
},
"|", // Separator
...
],
});
```
#### Height
To change the minimum height (before it starts auto-growing):