atularen / ngx-monaco-editor

Monaco Editor component for Angular 2 and Above
https://www.npmjs.com/package/ngx-monaco-editor
MIT License
428 stars 155 forks source link

ngx-monaco-editor not working with angular 12 #242

Open tusharpanumatcha opened 2 years ago

tusharpanumatcha commented 2 years ago

I have been trying to implement ngx-monaco-editor in my angular 12 projects but the component is not rendering i have implemented by following the https://www.npmjs.com/package/ngx-monaco-editor

stephengeorge568 commented 2 years ago

Have you resolved this? I have same issue. No errors, but nothing renders.

stephengeorge568 commented 2 years ago

image image

Its not linking up the editor node module with the assets directory. If I was more aware of Angular I'm sure this would be an easy fix. Look at your dev tools console. Might be the same issue.

coloz commented 2 years ago

change the config to:

{
  "glob": "**/*",
  "input": "node_modules/monaco-editor/dev",
  "output": "assets/monaco"
}
tusharpanumatcha commented 2 years ago

Hi,

I have resolved it but dealing with anew issue the editor is not responsive. I am using flex can you help me out ?

Thanks & Best Regards Tushar

On Sat, 15 Jan 2022, 7:46 pm Lvzhou, @.***> wrote:

change the config to:

{ "glob": "*/", "input": "node_modules/monaco-editor/dev", "output": "assets/monaco" }

— Reply to this email directly, view it on GitHub https://github.com/atularen/ngx-monaco-editor/issues/242#issuecomment-1013689669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKGRNZXPZOQFL2SMRHXAFTUWF6VDANCNFSM5KFQLMSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

doubler84 commented 2 years ago

{ "glob": "*/", "input": "./node_modules/monaco-editor/", "output": "/assets/monaco-editor/" }

This works.

miki995 commented 2 years ago

You have to install monaco-editor as from v10 ngx-monaco-editor requires it to be installed in your repo.

BTW:

@here I've a new fork with latest angular 14, ngZone upgrade and fixed production missing assets, have a look, works for my company now:

https://www.npmjs.com/package/ngx-monaco-editor-v2