0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 20:33:51 +00:00

Add editorTheme to editor.jsx and downstream

This commit is contained in:
G.Ambatte
2023-04-02 12:53:26 +12:00
parent 51f657d2c5
commit 7dd1368c09
3 changed files with 49 additions and 14 deletions

View File

@@ -49,7 +49,8 @@ const CodeEditor = createClass({
value : '',
wrap : true,
onChange : ()=>{},
enableFolding : true
enableFolding : true,
editorTheme : 'default'
};
},
@@ -91,6 +92,10 @@ const CodeEditor = createClass({
} else {
this.codeMirror.setOption('foldOptions', false);
}
if(prevProps.editorTheme !== this.props.editorTheme){
this.codeMirror.setOption('theme', this.props.editorTheme);
}
},
buildEditor : function() {
@@ -156,6 +161,7 @@ const CodeEditor = createClass({
autoCloseTags : true,
styleActiveLine : true,
showTrailingSpace : false,
theme : this.props.editorTheme
// specialChars : / /,
// specialCharPlaceholder : function(char) {
// const el = document.createElement('span');