CodeMirror: Formatting demo

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