Take a look at the code in demo .
<script type="text/javascript"> (function () { var converter1 = Markdown.getSanitizingConverter(); var editor1 = new Markdown.Editor(converter1); editor1.run(); } ); </script>
See where it is? At the end of the body. This means that the elements already exist. However, you are probably loading this JavaScript in your head. Instead, put the code in a block . Ready () or return it to the end of the body (or after the text field in the DOM).
source share