Accepts blank test in editor value getter/setter

patch-ionaru
Fernando Mendes 9 years ago
parent 586f49d64a
commit 709a51af19

@ -724,11 +724,11 @@ SimpleMDE.prototype.createStatusbar = function(status) {
* Get or set the text content.
*/
SimpleMDE.prototype.value = function(val) {
if (val) {
if (val === undefined) {
return this.codemirror.getValue();
} else {
this.codemirror.getDoc().setValue(val);
return this;
} else {
return this.codemirror.getValue();
}
};

Loading…
Cancel
Save