Last active
December 19, 2018 02:59
-
-
Save jcpst/06ed7465384c71c2aab4 to your computer and use it in GitHub Desktop.
Live markdown preview using jquery and marked.js
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
// Live markdown preview w/ jquery and marked.js | |
// https://github.com/chjj/marked | |
// HTML: | |
//<textarea rows=5 id="input"></textarea> | |
//<div id="output"></div> | |
$(document).ready(function () { | |
$("#input").keyup(function () { | |
var text = $(this).val(); | |
$("#output").html(marked(text)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aaaa