Skip to content

Instantly share code, notes, and snippets.

@munen
Created May 11, 2011 20:08
Show Gist options
  • Save munen/967225 to your computer and use it in GitHub Desktop.
Save munen/967225 to your computer and use it in GitHub Desktop.
mkd2html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="showdown.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script>
jQuery(document).ready(function() {
$('#leftContainer textarea').keyup(function() {
var input = $('#leftContainer textarea').val();
converter = new Showdown.converter();
text = converter.makeHtml(input);
$('#rightContainer').html(text);
});
});
</script>
</head>
<body>
<div id="leftContainer">
<textarea id="inputPane" cols="80" rows="20">
testinput
</textarea>
</div>
<div id="rightContainer">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment