Re-populating textarea field ngModel with linebreaks


#1

I am trying to re-populate a textarea field on a “Edit Profile” page where the user can enter in their biography.

<ion-textarea [(ngModel)]="signup.bio" name="bio" type="text" #bio="ngModel" placeholder="Please enter your bio..." required></ion-textarea>

However the ngmodel will re-populate the textarea with the text “\n” visible instead of breaking the line. What would be a good solution to this to allow the user to update their bio and allow for line breaks when they re-edit it? I am aware that when I want to display it I can use something like this below & use a replace for the “\n” to

<div [innerHTML]="attendee?.description"></div>

My problem is this will not solve the ability for them to edit within the textarea if theres linebreak saved in my database.

Any help is appreciated.