mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 16:52:38 +00:00
Make sure initial tab loads with language for code highlighting
This commit is contained in:
@@ -33,8 +33,8 @@ const CodeEditor = createClass({
|
|||||||
|
|
||||||
componentDidMount : function() {
|
componentDidMount : function() {
|
||||||
this.buildEditor();
|
this.buildEditor();
|
||||||
this.codeMirror.setValue(this.props.value);
|
const newDoc = CodeMirror.Doc(this.props.value, this.props.language);
|
||||||
this.codeMirror.clearHistory();
|
this.codeMirror.swapDoc(newDoc);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidUpdate : function(prevProps) {
|
componentDidUpdate : function(prevProps) {
|
||||||
|
|||||||
Reference in New Issue
Block a user