Skip to content

Commit 3b52012

Browse files
committed
fix: fix language can't be reset to plaintext (#4)
1 parent 09342bd commit 3b52012

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/code-editor/code-editor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ export class CodeEditor implements OnChanges, OnInit, OnDestroy, ControlValueAcc
333333

334334
/** Sets editor's language dynamically. */
335335
setLanguage(lang: string) {
336-
if (!lang) {
336+
if (!lang || lang == 'plaintext') {
337+
this._dispatchEffects(this._languageConf.reconfigure([]));
337338
return;
338339
}
339340
if (this.languages.length === 0) {

0 commit comments

Comments
 (0)