@hitachivantara/uikit-react-code-editor
v6.0.3
Published
A wrapper to the React Monaco editor (https://github.com/react-monaco-editor/react-monaco-editor) using the Hitachi Vantara's Design System styles.
Readme
@hitachivantara/uikit-react-code-editor
React Monaco editor wrapper with Hitachi Vantara Design System styles.
Installation
npm install @hitachivantara/uikit-react-code-editorUsage
import { HvCodeEditor } from "@hitachivantara/uikit-react-code-editor";
<HvCodeEditor
language="javascript"
defaultValue="console.log('Hello, World!');"
/>;Offline Support
The editor automatically handles offline support:
- Vite: Workers are bundled by default
- Other bundlers: Falls back to CDN
Vite Configuration
To prevent Vite from pre-bundling Monaco Editor, add the following to your vite.config.js:
export default {
optimizeDeps: {
exclude: ["monaco-editor"],
},
};Documentation
See Monaco Editor for React for additional options.
