mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-05-17 21:26:38 +02:00
Updated README to explain statusCustom support
This commit is contained in:
parent
7bc2cb3c41
commit
7904c44036
12
README.md
12
README.md
|
@ -100,6 +100,7 @@ simplemde.value("This text will appear in the editor");
|
|||
- **spellChecker**: If set to `false`, disable the spell checker. Defaults to `true`.
|
||||
- **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.
|
||||
- **statusCustom**: An object of custom elements to add to the statusbar
|
||||
- **tabSize**: If set, customize the tab size. Defaults to `2`.
|
||||
- **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`.
|
||||
|
@ -155,6 +156,17 @@ var simplemde = new SimpleMDE({
|
|||
spellChecker: false,
|
||||
status: false,
|
||||
status: ["autosave", "lines", "words", "cursor"], // Optional usage
|
||||
statusCustom: {
|
||||
countKeyStrokes: { // Counts the total number of keystrokes
|
||||
defaultValue: function(span) {
|
||||
this.keystrokes = 0;
|
||||
span.innerHTML = "0 Keystrokes";
|
||||
},
|
||||
onUpdate: function(span) {
|
||||
span.innerHTML = ++this.keystrokes + " Keystrokes";
|
||||
}
|
||||
}
|
||||
},
|
||||
tabSize: 4,
|
||||
toolbar: false,
|
||||
toolbarTips: false,
|
||||
|
|
Loading…
Reference in a new issue