Shift CSS link to CodeEditor render

This commit is contained in:
G.Ambatte committed 2023-04-02 13:19:43 +12:00
1 parent 7dd1368c09
commit b2546d908a
2 files changed
+4 -7

No files matched your search

-6
View File
@@ -268,14 +268,9 @@ const Editor = createClass({
this.forceUpdate();
},
renderEditorCSSLink : function(){
return <link href={`../homebrew/cm-themes/${this.state.editorTheme}.css`} rel='stylesheet' />;
},
renderEditor : function(){
if(this.isText()){
return <>
{this.renderEditorCSSLink()}
<CodeEditor key='codeEditor'
ref='codeEditor'
language='gfm'
@@ -288,7 +283,6 @@ const Editor = createClass({
}
if(this.isStyle()){
return <>
{this.renderEditorCSSLink()}
<CodeEditor key='codeEditor'
ref='codeEditor'
language='css'