How to use react-monaco-editor - 1 common examples

To help you get started, we’ve selected a few react-monaco-editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grommet / grommet-site / src / components / Doc / MonacoEditor.js View on Github external
import React from 'react';

// React Monaco Editor has a SSR Babel bug
// link: https://github.com/react-monaco-editor/react-monaco-editor/issues/133
const isWindow = typeof window !== 'undefined';
const ReactMonacoEditor = isWindow
  ? require('react-monaco-editor').default
  : undefined;

const MonacoEditor = props =>
  ReactMonacoEditor ?  : undefined; // eslint-disable-line react/jsx-props-no-spreading

export default MonacoEditor;

react-monaco-editor

Monaco Editor for React

MIT
Latest version published 2 months ago

Package Health Score

89 / 100
Full package analysis

Popular react-monaco-editor functions