CodeMirror integration fixes