I got this error'Uncaught TypeError: Cannot read property 'first' of undefined'. @ simplemde.min.js:7
Here is my code on demo.
<div id="MyID>
</div>
<script>
var simplemde = new SimpleMDE({ element: document.getElementById("MyID") });
</script>
Is this bug or am I doing wrong?
I don't think you have an element with the ID MyID
@WesCossick I am having this issue too. I have
<div id="message-editable"></div>
<script>
var simplemde = new SimpleMDE({ element: document.getElementById("message-editable") });
</script>
Any ideas? I can't figure out what's wrong.
The element with the ID needs to be a <textarea> to function properly.
I feel like the README should makes this more clear. After finding your response to the issue I see that the README shows it should be in a textarea, but if the example code was included then it would avoid a lot of confusion for people quickly trying to pick this up.
It's strange. I have it in one page working with div in another page I get this error.
And the div one is working more seamlessly with the server!
Most helpful comment
The element with the ID needs to be a
<textarea>to function properly.