Skip to content

Commit

Permalink
add javascript mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pdp2121 committed Nov 16, 2023
1 parent 32ce86a commit 8bab6d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/dev-tools/websocket-api-tool.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import {
import commandList from "./utils/data/command-list.json";
import connections from "./utils/data/connections.json";

if (typeof window !== "undefined" && typeof window.navigator !== "undefined") {
require("codemirror/mode/javascript/javascript");
}

export default function WebsocketApiTool() {
const { hash: slug } = useLocation();
console.log(slug);
Expand Down Expand Up @@ -242,6 +246,7 @@ export default function WebsocketApiTool() {
json: true,
smartIndent: false,
gutters: ["CodeMirror-lint-markers"],
lint: true,
}}
onChange={handleCurrentMethodChange}
/>
Expand Down

0 comments on commit 8bab6d0

Please sign in to comment.