Small fix

patch-ionaru
Fernando Mendes 9 years ago
parent 8e877a70d8
commit d02aa31c23

@ -467,10 +467,17 @@ function SimpleMDE(options) {
options.status = ['autosave', 'lines', 'words', 'cursor']; options.status = ['autosave', 'lines', 'words', 'cursor'];
} }
this.options = options; this.options = options;
// If user has passed an element, it should auto rendered // If user has passed an element, it should auto rendered
this.render(); this.render();
// The codemirror component is only available after rendering
// so, the setter for the defaultValue can only run after
// the element has been rendered
if (options.defaultValue) {
this.value(options.defaultValue);
}
} }
/** /**

Loading…
Cancel
Save