I am currently looking for an option to display markers (errors) received by a custom validator only in the right file.
An error looks something like this:
So it already kind of has the marker structure.
My application uses tabs like vs code and the user can switch between those or close them.
My question now is: How do I display this error using ngx-monaco-editor when the corresponding file is currently opened in the tab?
I have the path stored in the tab so I can check it like if (openedTab.path === error.file). My problem is that I somehow can not use monaco.editor.setModelMarkers(). I guess the reason is because I am using ngx-monaco-editor? What would monaco.editor be in my case?
My html looks like this:
<ngx-monaco-editor automaticLayout="true" style="height: 100%" [options]="editorOptions" [(ngModel)]="code" (ngModelChange)="save();" (onInit)="onInit($event); editorInit($event)"></ngx-monaco-editor>
Hello everybody.
I am currently looking for an option to display markers (errors) received by a custom validator only in the right file. An error looks something like this:
{ file: 'path/to/a/file', message: 'Field scope is deprecated', severity: 1, ruleName: 'deprecated-events', ruleDescription: 'Checks for deprecated events.', row: 310, column: 9 }
So it already kind of has the marker structure. My application uses tabs like vs code and the user can switch between those or close them.
My question now is: How do I display this error using ngx-monaco-editor when the corresponding file is currently opened in the tab?
I have the path stored in the tab so I can check it like
if (openedTab.path === error.file)
. My problem is that I somehow can not usemonaco.editor.setModelMarkers()
. I guess the reason is because I am using ngx-monaco-editor? What would monaco.editor be in my case?My html looks like this:
<ngx-monaco-editor automaticLayout="true" style="height: 100%" [options]="editorOptions" [(ngModel)]="code" (ngModelChange)="save();" (onInit)="onInit($event); editorInit($event)"></ngx-monaco-editor>
Thanks in advance!