laobubu / HyperMD

A WYSIWYG Markdown Editor for browsers. Break the Wall between writing and previewing.
MIT License
1.47k stars 137 forks source link

Cant seem to get it working, always producing error #77

Open mikeerickson opened 3 years ago

mikeerickson commented 3 years ago

In short, I have a simple <textarea>


....
<textarea id="editor-content"></textarea>
....
let HyperMD = require('hypermd')
let myTextarea = document.getElementById('editor-content')
let editor = HyperMD.fromTextArea(myTextarea)

Debugger error

image

Does a dead simple example exist which I can try? The documentation would lead to believe this to be a simple example? Should the element being targeted be a <textarea> or something else?