From a850d5c603a93199c90627538e1405d80a10b4b2 Mon Sep 17 00:00:00 2001 From: raclim Date: Thu, 14 Nov 2024 16:01:55 -0500 Subject: [PATCH] add style to console editor div, remove styling hook --- client/modules/IDE/components/ConsoleInput.jsx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/client/modules/IDE/components/ConsoleInput.jsx b/client/modules/IDE/components/ConsoleInput.jsx index 8f358c93a..c026d29d4 100644 --- a/client/modules/IDE/components/ConsoleInput.jsx +++ b/client/modules/IDE/components/ConsoleInput.jsx @@ -24,20 +24,8 @@ function ConsoleInput({ theme, fontSize }) { mode: 'javascript', inputStyle: 'contenteditable' }); - - cmInstance.current.getWrapperElement().style['font-size'] = `${fontSize}px`; }, []); - useEffect(() => { - if (cmInstance.current) { - cmInstance.current.setOption('theme', `p5-${theme}`); - cmInstance.current.getWrapperElement().style[ - 'font-size' - ] = `${fontSize}px`; - cmInstance.current.refresh(); - } - }, [theme, fontSize]); - useEffect(() => { const handleEnterKey = (cm, e) => { if (e.key === 'Enter' && !e.shiftKey) { @@ -146,7 +134,11 @@ function ConsoleInput({ theme, fontSize }) { }} /> -
+
); }