I've created some javascript code that will change code into text (codify), so people can copy and paste the code displayed. What I'm wondering, is how do I beautify the code itself (enable block levels, indentation, etc)?
Javascript thus far:
$(".codify").each(function(){
var text = $(this).html();
$(this).html(text.replace('<', '<').replace('>', '>').replace("/","/").replace("/n", "<br />"));
});