Questions tagged [ngx-monaco-editor]

33 questions
9
votes
2 answers

How to clear existing models, or is there a way to re-Init monaco editor

I'm using ngx-monaco-editor to implement a code editor in a modal. Because I need to support multiple tabs, I need to prepare a map for models to remember the models with Uris. The modal can also be reopened after closing it. Question: Once I reopen…
huan feng
  • 7,307
  • 2
  • 32
  • 56
6
votes
1 answer

Monaco editor default json uri schema

I'm using monaco editor to edit JSON and I would like to set a custom diagnostic option. I'm trying that https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-configure-json-defaults // Configures two JSON schemas,…
Rom1
  • 346
  • 4
  • 17
6
votes
1 answer

@materia-ui/ngx-monaco-editor - Unable to get a custom json schema working with editor

I cannot figure out how to get a custom json schema to be loaded in and used for validating input into a monaco editor instance using the @materia-ui/ngx-monaco-editor library I have been following guides here…
mindparse
  • 6,115
  • 27
  • 90
  • 191
5
votes
1 answer

No Provider for InjectionToken in embedding ngx-monaco-editor

I'm trying to embed Monaco Editor to a web application I'm working on using this guide https://github.com/atularen/ngx-monaco-editor#readme. I tried adding the ngx-monaco-editor tag and Angular gives me this error. Any ideas on how to resolve…
5
votes
3 answers

ngx-monaco-editor - unable to set layout size when container changes (using tab panel)

I am struggling with an instance of an ngx-monaco-editor inside a primeng tab panel which seems to loses its size calculations when switching to another tab, changing the model value bound to the editor and then switching back to the initial tab…
mindparse
  • 6,115
  • 27
  • 90
  • 191
3
votes
1 answer

Auto-format XML in Monaco Editor

I use the ngx-monaco-editor package in my Angular app to use Monaco Editor. I'm trying to set auto-formatting for XML content. Component @Component({ selector: 'app-my-component', templateUrl: './my.component.html', styleUrls:…
2
votes
0 answers

Monaco-editor : Is there a way to prevent cursor/editor's focus from being lost on clicking outside the editor ( on blur )

Monaco-editor :- Is there a way to prevent cursor/editor focus from being lost on clicking outside the editor. My scenario :- I have a list of items in a dropdown that is outside the editor , user can select a dropdown item and I am calling…
Veryon890
  • 330
  • 1
  • 4
  • 15
2
votes
1 answer

ngx-monaco-editor + Karma test runner - how to get monaco instance loaded into test suite?

I am making use of @materia-ui/ngx-monaco-editor in my application and am having trouble getting the monaco globally installed lib to be recognized during unit test runs with Karma+Jasmine. Component import { Component, OnInit } from…
mindparse
  • 6,115
  • 27
  • 90
  • 191
2
votes
0 answers

Monaco Editor :Change default Glyph Margin hover TOOLTIP styling

I am working on monaco editor and am looking for a way to style the tooltip hover on a glyph margin. To achieve the above image I inspected the element and found the css class (hover-row) which I modified as below to get the above…
Veryon890
  • 330
  • 1
  • 4
  • 15
1
vote
1 answer

Im trying to use ngx-monaco-editor to show an in browser code editor but its not showing

Here is my component.html code
Here is my component.ts files export class EditorComponent { …
1
vote
0 answers

translations in ngx-monaco-editor

I have integrated ngx-monaco-editor into my project and I would like to be able to change the locale and get the context menu in the corresponding language. I added monaco-editor-nls to the project and get Error:…
embug
  • 11
  • 3
1
vote
0 answers

Monaco-Editor callback for when a symbol or line number is selected from quickfind

How to add an action opening a dropdown menu in Monaco Editor? The above post shows how to retrieve IQuickInputService to create a custom quick find. They can show it, populate and then execute code after a user has made a selection, this is what…
1
vote
0 answers

monaco editor: use d.ts files from node_modules for library auto completion

I have installed a library @alfresco/js-api with npm. I want to have auto completion for all types and functions defined in this library on monaco editor. I have manage to load all my d.ts files in addExtraLib(). const files =…
1
vote
0 answers

How to enable java linting in Code Mirror?

We are trying to create a code editor(IDE) in Angular 11. We mainly use java code in it. We need to show lint errors while typing and also beautifier in it. Is there any package or solution already available?
SUDAR MANI
  • 71
  • 5
1
vote
0 answers

Moving from Ace to Monaco Editor -> Replace Ace's enableBasicAutocompletion and enableLiveAutocompletion

I'm replacing my Ace Editor with Monaco. the main used language in the editor is python. When I used ace, enableBasicAutocompletion and enableLiveAutocompletion where set to true. enableBasicAutocompletion - enable opening a pop up on…
Iris
  • 21
  • 3
1
2 3