Merge pull request #264 from NextStepWebs/pr/256

Pull request #256 remove conflicts
pull/266/head
Wes Cossick 8 years ago
commit 711af1b472

@ -78,6 +78,7 @@ simplemde.value("This text will appear in the editor");
- **code** Can be set to ```` ``` ```` or `~~~`. Defaults to ```` ``` ````.
- **italic** Can be set to `*` or `_`. Defaults to `*`.
- **element**: The DOM element for the textarea to use. Defaults to the first textarea on the page.
- **forceSync**: If set to `true`, force text changes made in SimpleMDE to be immediately stored in original textarea. Defaults to `false`.
- **hideIcons**: An array of icon names to hide. Can be used to hide specific icons shown by default without completely customizing the toolbar.
- **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`.
- **initialValue**: If set, will customize the initial value of the editor.
@ -120,6 +121,7 @@ var simplemde = new SimpleMDE({
italic: "_"
},
element: document.getElementById("MyID"),
forceSync: true,
hideIcons: ["guide", "heading"],
indentWithTabs: false,
initialValue: "Hello world!",

@ -1486,6 +1486,13 @@ SimpleMDE.prototype.render = function(el) {
placeholder: options.placeholder || el.getAttribute("placeholder") || ""
});
if(options.forceSync === true) {
var cm = this.codemirror;
cm.on("change", function() {
cm.save();
});
}
this.gui = {};
if(options.toolbar !== false) {

Loading…
Cancel
Save