Merge pull request #2739 from takluyver/editor-cm-mode-mime

Set CodeMirror mode using mimetype, not mode name
This commit is contained in:
Grant Nestor 2017-08-08 17:58:17 -04:00 committed by GitHub
commit f8d4d6ad2d

View File

@ -150,8 +150,10 @@ function(
/** set the codemirror mode from a modeinfo struct */
var that = this;
utils.requireCodeMirrorMode(modeinfo, function () {
that.codemirror.setOption('mode', modeinfo.mode);
that.codemirror.setOption('mode', modeinfo.mime);
that.events.trigger("mode_changed.Editor", modeinfo);
}, function(err) {
console.log('Error getting CodeMirror mode: ' + err);
});
};