mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Provide a onChange callback
This commit is contained in:
parent
6abda7ab68
commit
122fbabcc2
@ -88,6 +88,7 @@ simplemde.value("This text will appear in the editor");
|
|||||||
- link
|
- link
|
||||||
- table
|
- table
|
||||||
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
|
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
|
||||||
|
- **onChange**: A function that will be called on every change.
|
||||||
- **parsingConfig**: Adjust settings for parsing the Markdown during editing (not previewing).
|
- **parsingConfig**: Adjust settings for parsing the Markdown during editing (not previewing).
|
||||||
- **allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`.
|
- **allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`.
|
||||||
- **strikethrough**: If set to `false`, will not process GFM strikethrough syntax. Defaults to `true`.
|
- **strikethrough**: If set to `false`, will not process GFM strikethrough syntax. Defaults to `true`.
|
||||||
|
@ -1501,6 +1501,9 @@ SimpleMDE.prototype.render = function(el) {
|
|||||||
cm.save();
|
cm.save();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if(options.onChange) {
|
||||||
|
this.codemirror.on("change", options.onChange);
|
||||||
|
}
|
||||||
|
|
||||||
this.gui = {};
|
this.gui = {};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user