Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Markdown processor
<script src=""></script>
var converter = new showdown.Converter();
converter.setOption('tables', true);
converter.setOption('simpleLineBreaks', true);
converter.setOption('emoji', true);
window.renderMarkdown = function() {
var markdownInput = document.querySelector('#markdownInput').value;
var markdownElem = document.querySelector('#markdownRendered');
markdownElem.innerHTML = converter.makeHtml(markdownInput);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.