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 }) {
2424 mode : 'javascript' ,
2525 inputStyle : 'contenteditable'
2626 } ) ;
27-
28- cmInstance . current . getWrapperElement ( ) . style [ 'font-size' ] = `${ fontSize } px` ;
2927 } , [ ] ) ;
3028
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-
4129 useEffect ( ( ) => {
4230 const handleEnterKey = ( cm , e ) => {
4331 if ( e . key === 'Enter' && ! e . shiftKey ) {
@@ -146,7 +134,11 @@ function ConsoleInput({ theme, fontSize }) {
146134 } }
147135 />
148136 </ div >
149- < div ref = { codemirrorContainer } className = "console__editor" />
137+ < div
138+ ref = { codemirrorContainer }
139+ className = "console__editor"
140+ style = { { fontSize : `${ fontSize } px` } }
141+ />
150142 </ div >
151143 ) ;
152144}
You can’t perform that action at this time.
0 commit comments