Text Editor

A simple, beautiful, and embeddable JavaScript Markdown editor.

Html form textarea

                  
                    <div class="mb-6">
                      <label for="texteditor" class="inline-block mb-2">Example textarea with editor</label>
                      <textarea class="texteditor w-full leading-5 relative py-3 px-5 rounded text-gray-800 bg-white border border-gray-300 overflow-x-auto focus:outline-none focus:border-gray-400 focus:ring-0 dark:text-gray-300 dark:bg-gray-700 dark:border-gray-700 dark:focus:border-gray-600" id="texteditor" rows="3"></textarea>
                    </div>
                  
                

Javascript

                  
<script src="vendors/simplemde/dist/simplemde.min.js"></script>
<script>
const text_editor = document.querySelectorAll(".texteditor");
if ( text_editor != null) {
  for( var i = 0; i < text_editor.length; i++)
  {
    const simplemde = new SimpleMDE({ element: text_editor[i]});
  }
};
</script>
                  
                

Demo config available in src/js/vendor.js function myEditor();

HTML Content

Please add post-content classes in where you want to paste post content.

<div class="mb-6 post-content"> <!-- paste content on here --> </div>

More information about SimpleMDE please read on here