# CodeMirror: Formatting demo

<script> function (s,e){ for(var i=0; i < 1; i++) test("test();a=1");} </script> <script> function test(c){ for (var i = 0; i < 10; i++){ process("a.b();c = null;", 300);} } </script> <table><tr><td>test 1</td></tr><tr><td>test 2</td></tr></table> <script> function test() { return 1;} </script> <style> .test { font-size: medium; font-family: monospace; } </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