How to use the @monaco-editor/react.monaco.config function in @monaco-editor/react

To help you get started, we’ve selected a few @monaco-editor/react 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 embark-framework / embark / packages / cockpit / ui / src / components / TextEditor.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import FontAwesomeIcon from 'react-fontawesome';
import classNames from 'classnames';
import {SortableContainer, SortableElement} from 'react-sortable-hoc';
import arrayMove from 'array-move';

import {DARK_THEME, LIGHT_THEME} from '../constants';

import {monaco as monacoReact} from '@monaco-editor/react';
monacoReact
  .config({
    urls: {
      monacoLoader: '/vsdir/vsdir/vs/loader.js',
      monacoBase: '/vsdir/vsdir/vs'
    },
  });

const SUPPORTED_LANGUAGES = ['css', 'sol', 'html', 'json'];
const DEFAULT_LANGUAGE = 'javascript';
const EDITOR_ID = 'react-monaco-editor-container';
const GUTTER_GLYPH_MARGIN = 2;

let monacoResolved;
let rejectMonaco;
let resolveMonaco;
let monaco;

@monaco-editor/react

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

MIT
Latest version published 1 year ago

Package Health Score

76 / 100
Full package analysis