microsoft / AdaptiveCards

A new way for developers to exchange card content in a common and consistent way.
https://adaptivecards.io
MIT License
1.76k stars 550 forks source link

Adaptive cards Monaco Editor is not getting loaded with the Angular #7776

Open mohitborse opened 2 years ago

mohitborse commented 2 years ago

Problem Description

Hi Team,

I'm trying to integrate the Adaptive card designer with the Angular application. I make a one-live solution for it but in that, I'm facing one problem I'm not able to load Monaco editor in that.

So anyone can provide a real way to integrate the Adaptive cards with the Angular App? https://stackblitz.com/edit/angular-ivy-mfde8r?file=src/app/app.component.ts

Card JSON

So anyone can provide a real way to integrate the Adaptive cards with the Angular App?
https://stackblitz.com/edit/angular-ivy-mfde8r?file=src/app/app.component.ts

Screenshot

image

paulcam206 commented 2 years ago

I've not done this personally, but it should be possible to pass in an instance of monaco to designer.monacoModuleLoaded():

https://github.com/microsoft/AdaptiveCards/blob/71aeddce59f56dfb918b9199550fe0a9eef414b1/source/nodejs/adaptivecards-designer/src/card-designer.ts#L1343-L1346

Poking around with a web search, it looks like there are a number of recommendations for getting monaco inside an Angular app more generally, so maybe one of those approaches will work in getting it loaded?