mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +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() {
|
||||
this.buildEditor();
|
||||
this.codeMirror.setValue(this.props.value);
|
||||
this.codeMirror.clearHistory();
|
||||
const newDoc = CodeMirror.Doc(this.props.value, this.props.language);
|
||||
this.codeMirror.swapDoc(newDoc);
|
||||
},
|
||||
|
||||
componentDidUpdate : function(prevProps) {
|
||||
|
||||
Reference in New Issue
Block a user