diff --git a/.changeset/hip-dolphins-relax.md b/.changeset/hip-dolphins-relax.md new file mode 100644 index 0000000..9c8a580 --- /dev/null +++ b/.changeset/hip-dolphins-relax.md @@ -0,0 +1,5 @@ +--- +"ng-monaco-editor": patch +--- + +fix: use getLanguageId instead of model.id diff --git a/src/monaco-common-editor.component.ts b/src/monaco-common-editor.component.ts index f6ca52c..69f7cec 100644 --- a/src/monaco-common-editor.component.ts +++ b/src/monaco-common-editor.component.ts @@ -227,7 +227,7 @@ export abstract class MonacoCommonEditorComponent this.editor = this.createEditor(); this.listenModelChanges(); this.editorChange.emit(this.editor); - this.modelId = this.model!.id; + this.modelId = this.model!.getLanguageId(); this.cdr.markForCheck(); } }