我正在尝试在Angular-6应用程序中将Monaco Editor集成到我的angular库中,这方面我是新手,官方文档中没有任何实现的设置指南。任何建议或指导都将不胜感激。
发布于 2019-11-13 20:01:17
使用ngx-monaco-editor NPM模块
它提供对各种angular版本的支持
对于Angular 6,您需要这样做
npm install ngx-monaco-editor@6.0.0 --save然后在app.module中引用该模块
import { MonacoEditorModule } from 'ngx-monaco-editor';
...
imports: [
...
MonacoEditorModule.forRoot(),
...然后在你的html组件中,你可以这样使用它:
<ngx-monaco-editor ... ></ngx-monaco-editor>https://stackoverflow.com/questions/58238867
复制相似问题