File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
client/modules/IDE/components Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,8 @@ function ConsoleInput({ theme, fontSize }) {
24
24
mode : 'javascript' ,
25
25
inputStyle : 'contenteditable'
26
26
} ) ;
27
-
28
- cmInstance . current . getWrapperElement ( ) . style [ 'font-size' ] = `${ fontSize } px` ;
29
27
} , [ ] ) ;
30
28
31
- useEffect ( ( ) => {
32
- if ( cmInstance . current ) {
33
- cmInstance . current . setOption ( 'theme' , `p5-${ theme } ` ) ;
34
- cmInstance . current . getWrapperElement ( ) . style [
35
- 'font-size'
36
- ] = `${ fontSize } px` ;
37
- cmInstance . current . refresh ( ) ;
38
- }
39
- } , [ theme , fontSize ] ) ;
40
-
41
29
useEffect ( ( ) => {
42
30
const handleEnterKey = ( cm , e ) => {
43
31
if ( e . key === 'Enter' && ! e . shiftKey ) {
@@ -146,7 +134,11 @@ function ConsoleInput({ theme, fontSize }) {
146
134
} }
147
135
/>
148
136
</ div >
149
- < div ref = { codemirrorContainer } className = "console__editor" />
137
+ < div
138
+ ref = { codemirrorContainer }
139
+ className = "console__editor"
140
+ style = { { fontSize : `${ fontSize } px` } }
141
+ />
150
142
</ div >
151
143
) ;
152
144
}
You can’t perform that action at this time.
0 commit comments