Browse Source

Merge pull request #230 from afshin/cleanup

Bugfix: banner highlighting
Steven Silvester 9 years ago
parent
commit
0ded3e6a0d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/notebook/cells/widget.ts

+ 6 - 0
src/notebook/cells/widget.ts

@@ -142,11 +142,17 @@ class BaseCellWidget extends Widget {
     super();
     this.addClass(CELL_CLASS);
     this._model = model;
+
     let ctor = this.constructor as typeof BaseCellWidget;
     this._editor = ctor.createCellEditor(model);
     this._input = ctor.createInputArea(this._editor);
+
+    // Set the editor mode to be the default MIME type.
+    loadModeByMIME(this._editor.editor, this._mimetype);
+
     this.layout = new PanelLayout();
     (this.layout as PanelLayout).addChild(this._input);
+
     model.metadataChanged.connect(this.onMetadataChanged, this);
     this._trustedCursor = model.getMetadata('trusted');
     this._trusted = this._trustedCursor.getValue();