Skip to content

Commit 0fb087c

Browse files
committed
Add forceSynch option which will autosave to textarea.
Since this is built on CodeMirror I opted to use CodeMirror's save behaviour rather than pulling the value and stomping on the textarea's innerHtml. Fixes sparksuite#193
1 parent 71d979a commit 0fb087c

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ simplemde.value("This text will appear in the editor");
7878
- **code** Can be set to ```` ``` ```` or `~~~`. Defaults to ```` ``` ````.
7979
- **italic** Can be set to `*` or `_`. Defaults to `*`.
8080
- **element**: The DOM element for the textarea to use. Defaults to the first textarea on the page.
81+
- **forceSynch**: If set to `true`, force changes made in editor to be saved back to original textarea.
8182
- **hideIcons**: An array of icon names to hide. Can be used to hide specific icons shown by default without completely customizing the toolbar.
8283
- **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`.
8384
- **initialValue**: If set, will customize the initial value of the editor.

0 commit comments

Comments
 (0)