Set mode on CodeMirror editor