mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-17 06:54:27 -06:00
KISS fix
This commit is contained in:
parent
55312d8ec3
commit
8b177f9c05
@ -2745,22 +2745,22 @@ EasyMDE.prototype.toTextArea = function () {
|
|||||||
var wrapper = cm.getWrapperElement();
|
var wrapper = cm.getWrapperElement();
|
||||||
var easyMDEContainer = wrapper.parentNode;
|
var easyMDEContainer = wrapper.parentNode;
|
||||||
|
|
||||||
if (wrapper.parentNode) {
|
if (easyMDEContainer) {
|
||||||
if (this.gui.toolbar) {
|
if (this.gui.toolbar) {
|
||||||
wrapper.parentNode.removeChild(this.gui.toolbar);
|
easyMDEContainer.removeChild(this.gui.toolbar);
|
||||||
}
|
}
|
||||||
if (this.gui.statusbar) {
|
if (this.gui.statusbar) {
|
||||||
wrapper.parentNode.removeChild(this.gui.statusbar);
|
easyMDEContainer.removeChild(this.gui.statusbar);
|
||||||
}
|
}
|
||||||
if (this.gui.sideBySide) {
|
if (this.gui.sideBySide) {
|
||||||
wrapper.parentNode.removeChild(this.gui.sideBySide);
|
easyMDEContainer.removeChild(this.gui.sideBySide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unwrap easyMDEcontainer before codemirror toTextArea() call
|
// Unwrap easyMDEcontainer before codemirror toTextArea() call
|
||||||
easyMDEContainer.parentNode.insertBefore(wrapper, easyMDEContainer);
|
easyMDEContainer.parentNode.insertBefore(wrapper, easyMDEContainer);
|
||||||
easyMDEContainer.remove();
|
easyMDEContainer.remove();
|
||||||
|
|
||||||
cm.toTextArea();
|
cm.toTextArea();
|
||||||
|
|
||||||
if (this.autosaveTimeoutId) {
|
if (this.autosaveTimeoutId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user