This is a simple demonstration of the XML/HTML indentation module for CodeMirror. The javascript file contains some comments with more information.