Closed mlab817 closed 3 years ago
I am trying to make a feature where when a user clicks on a textarea, EasyMDE is added to that textarea. I am using the following code to do that:
let editor = new EasyMDE({ element: document.getElementById("editor") });
The problem is trying to remove it when I click a cancel button.
let editor = new EasyMDE({ element: document.getElementById("editor") }); editor.toTextArea(); editor = null;
It does remove the first EasyMDE but I'm left with another one.
What am I missing?
I guess it's because I'm creating a new instance with the remove editor code.
I am trying to make a feature where when a user clicks on a textarea, EasyMDE is added to that textarea. I am using the following code to do that:
let editor = new EasyMDE({ element: document.getElementById("editor") });
The problem is trying to remove it when I click a cancel button.
let editor = new EasyMDE({ element: document.getElementById("editor") }); editor.toTextArea(); editor = null;
It does remove the first EasyMDE but I'm left with another one.
What am I missing?