Angular wrapper for monaco-editor
- Angular 7+
- monaco-editor: 1.5+
Add npm dependencies
yarn add monaco-editor ng-monaco-editor
Configure monaco-editor library assets
Currently this library only supports load monaco-editor with AMD mode. You have to make sure your Angular application could have access to the monaco-editor library assets via RequireJS.
If you are using Angular CLI to bootstrap your app, you could add the following:
Load ng-monaco-editor module
Most of the time, you should configure the module at the root module.
Please refer to the storybook (
This module provide three usages:
Note, if the height of ng-monaco-editor/ng-monaco-diff-editor is too small, you may have to resize it yourself. This is a limitation and by design that how monaco-editor works.