Skip to content

nikogoli/monaco-fresh

 
 

Repository files navigation

monaco-editor for fresh (deno)

forked from @monaco-editor/react

Monaco Editor for Deno; use the monaco-editor in any fresh application.

Usage

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.

More Information

Please read @monaco-editor/react's document.

About

Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%