mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 09:54:28 -06:00
Fix toTextArea issue
Solves https://github.com/Ionaru/easy-markdown-editor/issues/217
This commit is contained in:
parent
754bdc3ab2
commit
55312d8ec3
@ -2743,6 +2743,7 @@ EasyMDE.prototype.getState = function () {
|
||||
EasyMDE.prototype.toTextArea = function () {
|
||||
var cm = this.codemirror;
|
||||
var wrapper = cm.getWrapperElement();
|
||||
var easyMDEContainer = wrapper.parentNode;
|
||||
|
||||
if (wrapper.parentNode) {
|
||||
if (this.gui.toolbar) {
|
||||
@ -2756,6 +2757,10 @@ EasyMDE.prototype.toTextArea = function () {
|
||||
}
|
||||
}
|
||||
|
||||
// Unwrap easyMDEcontainer before codemirror toTextArea() call
|
||||
easyMDEContainer.parentNode.insertBefore(wrapper, easyMDEContainer);
|
||||
easyMDEContainer.remove();
|
||||
|
||||
cm.toTextArea();
|
||||
|
||||
if (this.autosaveTimeoutId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user