CodeMirror code highlight to template editor