Extractingh CodeMirrorDocHandler into a separate file.