New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to access the Monaco instance to add custom languages? #328
Comments
I'm facing the same issue, @xtagon have you managed to figure out how to access the monaco instance for adding a custom language? |
@dinager I don't know if it can be done without modifying ember-monaco. One idea is to change these lines to return the Monaco instance and not just the editor instance, and then you can in theory use the onReady callback in any way you like: https://github.com/mike-north/ember-monaco/blob/master/addon/components/code-editor.ts#L42-L51 ...but I haven't tried it yet |
I managed to define a custom language using the current here is my code:
|
Hi,
Is it possible to access the Monaco instance (not the editor instance) to add custom language/intellisense support?
I thought about modifying the onReady callback to provide both the editor and monaco instances from the iframe, but it seems to me this should really be done in an initializer before any editor components are initialized, not as a callback on individual editors. But I'm not sure how to accomplish that without access to the global.
Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: