diff --git a/frontend/src/components/CodeMirror.tsx b/frontend/src/components/CodeMirror.tsx index 78d94ce..cd11027 100644 --- a/frontend/src/components/CodeMirror.tsx +++ b/frontend/src/components/CodeMirror.tsx @@ -11,6 +11,7 @@ import { } from "@codemirror/commands"; import { bracketMatching } from "@codemirror/language"; import { html } from "@codemirror/lang-html"; +import { javascript } from "@codemirror/lang-javascript"; import { EditorTheme } from "@/types"; import { FaCopy } from "react-icons/fa"; @@ -35,6 +36,7 @@ function CodeMirror({ code, editorTheme, onCodeChange, doCopyCode }: Props) { ]), lineNumbers(), bracketMatching(), + javascript(), // Added JavaScript support html(), editorTheme === EditorTheme.ESPRESSO ? espresso : cobalt, EditorView.lineWrapping, @@ -73,7 +75,7 @@ function CodeMirror({ code, editorTheme, onCodeChange, doCopyCode }: Props) {