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:
- 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)
- Now, you need to install the monaco-editor library:
npm i monaco-editor ...