mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 15:44:28 -06:00
Fix bug with toolbar not hiding
This commit is contained in:
parent
958e3c08c7
commit
9999fd93c1
@ -47,13 +47,13 @@ simplemde.codemirror.getValue();
|
||||
|
||||
- **element**: The DOM element for the textarea to use. Defaults to the first textarea on the page.
|
||||
- **status**: If set false, hide the status bar. Defaults to true.
|
||||
- **tools**: If set false, hide the toolbar. Defaults to true.
|
||||
- **toolbar**: If set false, hide the toolbar. Defaults to true.
|
||||
|
||||
```
|
||||
new SimpleMDE({
|
||||
element: document.getElementById("MyID"),
|
||||
status: false,
|
||||
tools: false,
|
||||
toolbar: false,
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -444,6 +444,9 @@ function SimpleMDE(options) {
|
||||
this.element = options.element;
|
||||
}
|
||||
|
||||
if(options.toolbar === false)
|
||||
options.toolbar = [];
|
||||
else
|
||||
options.toolbar = options.toolbar || SimpleMDE.toolbar;
|
||||
// you can customize toolbar with object
|
||||
// [{name: 'bold', shortcut: 'Ctrl-B', className: 'icon-bold'}]
|
||||
|
Loading…
x
Reference in New Issue
Block a user