CodeMirror: Formatting demo

x
1
<script> function (s,e){ for(var i=0; i < 1; i++) test("test();a=1");} </script>
2
<script>
3
function test(c){  for (var i = 0; i < 10; i++){              process("a.b();c = null;", 300);}
4
}
5
</script>
6
<table><tr><td>test 1</td></tr><tr><td>test <strong>2</strong></td></tr></table>
7
<script> function test() { return 1;} </script>
8
<style> .test { font-size: medium; font-family: monospace; }
9
</style>
 

Select a piece of code and click one of the links below to apply automatic formatting to the selected text or comment/uncomment the selected text. Note that the formatting behavior depends on the current block's mode.

Autoformat Selected Comment Selected Uncomment Selected