Created
May 11, 2011 23:20
-
-
Save mde/967610 to your computer and use it in GitHub Desktop.
HTML markdown viewer
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<script type="text/javascript" src="./showdown.js"></script> | |
<title> | |
Markdown Viewer | |
</title> | |
<style type="text/css"> | |
#markdown-contents { | |
width: 600px; | |
padding: 0 10px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="markdown-contents"></div> | |
<script type="text/javascript"> | |
var directory = "./xdr-proxy"; | |
var filename = "README.markdown"; | |
var path = directory + "/" + filename; | |
var md2html = function (path) { | |
// Load contents and convert to HTML | |
$("#markdown-contents").load(path, function(text, status){ | |
var sdconv = new Showdown.converter(); | |
this.innerHTML = sdconv.makeHtml(text); | |
}); | |
} | |
md2html(path); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks bud