Last active
December 18, 2015 20:07
-
-
Save nallerooth/26f3ea90593d355d4be1 to your computer and use it in GitHub Desktop.
Blog Test gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var init = function () { | |
function renderMarkdown(srcId, dstId) { | |
var src = document.getElementById(srcId); | |
var dst = document.getElementById(dstId); | |
var process = null; | |
// Add some comments to this before deploy | |
process = function () { | |
dst.innerHTML = markdown.toHTML(src.value); | |
}; | |
src.addEventListener('keyup', process, false); | |
} | |
// And we're DONE | |
renderMarkdown('articleContent', 'markdownPreview'); | |
}; | |
init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment