mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-17 12:39:54 +08:00
Merge pull request #2739 from takluyver/editor-cm-mode-mime
Set CodeMirror mode using mimetype, not mode name
This commit is contained in:
commit
f8d4d6ad2d
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user