Skip to content

Commit

Permalink
Merge pull request #2739 from takluyver/editor-cm-mode-mime
Browse files Browse the repository at this point in the history
Set CodeMirror mode using mimetype, not mode name
  • Loading branch information
gnestor authored Aug 8, 2017
2 parents b099303 + 835bbd1 commit f8d4d6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion notebook/static/edit/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
};

Expand Down

0 comments on commit f8d4d6a

Please sign in to comment.