monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Use Monaco Editor in AngularJS 1.X

Open SoftTimur opened this issue 9 years ago • 2 comments

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

SoftTimur avatar Aug 08 '17 10:08 SoftTimur

ui-codemirror is an angular library which wraps codemirror, what you need is one for monaco.

rebornix avatar Aug 09 '17 18:08 rebornix

Dup of https://github.com/Microsoft/monaco-editor/issues/534 .

rebornix avatar Aug 09 '17 18:08 rebornix