This AngularJS module provides yu with directive to integrate the Monaco Editor in your applications.
- AngularsJS (tested with 1.5.9 & 1.6.1, but should work for >1.3)
- Monaco Editor (tested with 0.8.1)
To use the directives, you'll need to include the anguComp.monacoEditor module.
This directive provides support for the standard editor.
The model of the directive.
Options to customize the editor.
The language of the editor. Refer to your Monaco editor's documentation to get a list of supported language.
Default: "javascript"
Display/hide the line numbers.
Default: true
The theme of the editor. Refer to your Monaco editor's document to get a list of theme.
Default: "vs-dark"
If true, automatically resize the editor. (Be careful, it could have performance issue on your application).
Default:false
A read-only text which will pefix your code. Note that it will not be included in your model.
Default:""
A read-only text which will suffix your code. Note that it will not be included in your model.
Default: ""
The height of the editor. Only pixel ("px") and percentage ("%") values are supported.
Default:"600px"
The width of the editor. Only pixel ("px") and percentage ("%") values are supported.
Default:"800px"
Set the code to read only.
Default:false
Same as ng-readonly.
This directive provides support for the diff editor.
The original content used for comparison. It will appear on the left side.
The modified contnt used for comparison. It will appear on the right side.
Options to customize the editor.
Display/hide the line numbers.
Default: true
The theme of the editor. Refer to your Monaco editor's document to get a list of theme.
Default: "vs-dark"
If true, automatically resize the editor. (Be careful, it could have performance issue on your application).
Default:false
The height of the editor. Only pixel ("px") and percentage ("%") values are supported.
Default:"600px"
The width of the editor. Only pixel ("px") and percentage ("%") values are supported.
Default:"800px"