monaco-editor
monaco-editor copied to clipboard
Use Monaco Editor in AngularJS 1.X
I can well run this sample of Monaco Editor. But I don't know how to make it work with AngularJS 1.X.
For example, I want to bind ng-if, ng-model and ng-change to the editor, to decide when and what to display, and run a function if there is any change. With ui-codemirror, we could write with a directive:
<textarea ng-if="condition" ng-change="change(content)" ng-model="content" ui-codemirror="{ mode: 'application/json' }"></textarea>
So does anyone know if there is such ui- directive for Monaco Editor? Is there any workaround to achieve the same thing within angular framework?
Thank you
ui-codemirror is an angular library which wraps codemirror, what you need is one for monaco.
Dup of https://github.com/Microsoft/monaco-editor/issues/534 .