JSPM

@patternfly/react-code-editor

4.82.15
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12003
  • Score
    100M100P100Q134399F
  • License MIT

This package provides a PatternFly wrapper for the Monaco code editor

Package Exports

  • @patternfly/react-code-editor
  • @patternfly/react-code-editor/dist/esm/index.js
  • @patternfly/react-code-editor/dist/js/index.js
  • @patternfly/react-code-editor/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@patternfly/react-code-editor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@patternfly/react-code-editor

This package provides a PatternFly wrapper for the Monaco code editor

Prerequisite

Node Environment

This project currently supports Node Active LTS releases. Please stay current with Node Active LTS when developing patternfly-react.

For example, to develop with Node 8, use the following:

nvm install 8
nvm use 8

This project also requires a Yarn version of >=1.6.0. The latest version can be installed here.

Installing

yarn add @patternfly/react-code-editor

or

npm install @patternfly/react-code-editor --save

Usage

Pre-requisites

It's strongly advised to use the PatternFly Base CSS in your whole project, or some components may diverge in appearance:

import '@patternfly/react-core/dist/styles/base.css';
import { CodeEditor } from '@patternfly/react-code-editor';

Install peer deps

"monaco-editor": "^0.21.3",
"monaco-editor-webpack-plugin": "^2.1.0",
"react": "^16.8 || ^17 || ^18",
"react-dom": "^16.8 || ^17 || ^18",
"react-monaco-editor": "^0.41.2"

To properly install the library monaco-editor-webpack-plugin be sure to follow the plugin instructions