forked from @monaco-editor/react
Monaco Editor for Deno; use the monaco-editor in any fresh application.
Just import components in YourFreshProject/islands/xxx.tsx
.
import { Editor } from "https://pax.deno.dev/nikogoli/monaco-fresh/src/mod.ts"
export default function Monaco() {
return (
<>
<Editor
height="90vh"
defaultLanguage="javascript"
defaultValue={"function hello() {\n\talert('Hello world!');\n}"}
/>
</>
)
}
CAUTION: Do not import the components in ./routes/xxx.tsx
directly, because they need to use useEffect
.
Please read @monaco-editor/react's document.