Error
simplemde.min.js:7 Uncaught TypeError: Cannot read property 'first' of undefined
at new t (simplemde.min.js:7)
at new e (simplemde.min.js:7)
at e (simplemde.min.js:7)
at Function.e.fromTextArea (simplemde.min.js:12)
at B.render (simplemde.min.js:15)
at new B (simplemde.min.js:14)
at add:140
My Code
<script>
var content = new SimpleMDE({ element: document.getElementById("topiccontent") });
</script>
Fixed: Needed to use a Textarea only controls do not work
Same here. Did you figure out a fix?
@repat It looks like the fix is the element argument to the SimpleMDE constructor should be a textarea element (as opposed to a div).
Is it worth putting a DOM-element type check in the SimpleMDE constructor to avoid confusion for new users? I'd be happy to submit a PR.
Most helpful comment
Fixed: Needed to use a Textarea only controls do not work