Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Markdown processor
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js"></script>
<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);
}
</script>
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.