mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 09:54:28 -06:00
Accepts blank test in editor value getter/setter
This commit is contained in:
parent
586f49d64a
commit
709a51af19
@ -724,11 +724,11 @@ SimpleMDE.prototype.createStatusbar = function(status) {
|
|||||||
* Get or set the text content.
|
* Get or set the text content.
|
||||||
*/
|
*/
|
||||||
SimpleMDE.prototype.value = function(val) {
|
SimpleMDE.prototype.value = function(val) {
|
||||||
if (val) {
|
if (val === undefined) {
|
||||||
|
return this.codemirror.getValue();
|
||||||
|
} else {
|
||||||
this.codemirror.getDoc().setValue(val);
|
this.codemirror.getDoc().setValue(val);
|
||||||
return this;
|
return this;
|
||||||
} else {
|
|
||||||
return this.codemirror.getValue();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user