mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-06-07 16:32:40 +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`.
|
- **spellChecker**: If set to `false`, disable the spell checker. Defaults to `true`.
|
||||||
- **status**: If set to `false`, hide the status bar. 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.
|
- 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`.
|
- **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).
|
- **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`.
|
- **toolbarTips**: If set to `false`, disable toolbar button tips. Defaults to `true`.
|
||||||
|
@ -155,6 +156,17 @@ var simplemde = new SimpleMDE({
|
||||||
spellChecker: false,
|
spellChecker: false,
|
||||||
status: false,
|
status: false,
|
||||||
status: ["autosave", "lines", "words", "cursor"], // Optional usage
|
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,
|
tabSize: 4,
|
||||||
toolbar: false,
|
toolbar: false,
|
||||||
toolbarTips: false,
|
toolbarTips: false,
|
||||||
|
|
Loading…
Reference in a new issue