Ionaru / Ionaru/easy-markdown-editor
`toTextArea()` no longer functions in 2.11.0
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Calling `toTextArea()` results in an exception:
```
Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
```
**To Reproduce**
Steps to reproduce the behavior:
1. Call the `toTextArea()` function on an instance of EasyMDE.
https://stackblitz.com/edit/js-r8f7lh
**Expected behavior**
Text area to be successfully restored and EasyMDE disposed.
** Version information **
- OS: all
- Browser: Edge 84
- EasyMDE version: 2.11.0
**Additional context**
Issue does not occur in 2.10.1, only started occuring in 2.11.0
Seems to be related to changing the DOM hierarchy by adding another container div which causes issues with the underlying CodeMirror `toTextArea()` function code.
Contributor guide
Assessment
This issue has not been assessed yet.