how to set mode in codemirror