Installing the editor component

First of all, to have full integration with the Monaco Editor, we need to eject the React application. You can read about the ejection process in the React documentation by following this link: https://create-react-app.dev/docs/available-scripts#npm-run-eject. Follow these steps to install the editor:

  1. Run the following command:
npm run eject

The tool is going to ask for your confirmation. Press y to confirm:

$ react-scripts ejectNOTE: Create React App 2+ supports TypeScript, Sass, CSS Modules and more without ejecting: https://reactjs.org/blog/2018/10/01/create-react-app-v2.html? Are you sure you want to eject? This action is permanent. (y/N) 
  1. Now, you need to install the monaco-editor library:
npm i monaco-editor ...

Get Electron Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.