Skip to content

Instantly share code, notes, and snippets.

@jcpst
Last active December 19, 2018 02:59
Show Gist options
  • Save jcpst/06ed7465384c71c2aab4 to your computer and use it in GitHub Desktop.
Save jcpst/06ed7465384c71c2aab4 to your computer and use it in GitHub Desktop.
Live markdown preview using jquery and marked.js
// 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));
});
});
@PH007
Copy link

PH007 commented Dec 19, 2018

aaaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment