scttcper / ngx-codemirror

Codemirror Wrapper for Angular
https://ngx-codemirror.vercel.app
MIT License
282 stars 47 forks source link

"value" option property not working on Angular 12 #309

Open iagoccampos opened 2 years ago

iagoccampos commented 2 years ago

Passing a text to property value does not reflect on code editor. ngModel does not reflect the value too.

Value:

<ngx-codemirror [options]="{ value: '???', readOnly: true }"></ngx-codemirror>

ngModel:

<ngx-codemirror [options]="{ readOnly: true }" [(ngModel)]="headerText"></ngx-codemirror>
headerText = 'Header'
EdvinM commented 2 years ago

Same issue with Angular 13.

jormazlop commented 1 year ago

Tested in angular 15 with ngModel, seems to be working fine (I have not tried the value property).