I am trying to display a long text area in a lightning web component with its line breaks. Unfortunately the "\n" characters are being displayed as spaces in the HTML template rather than line breaks.
I tried the to stringify the long text area in the javascript with the below line:
this.noteText = JSON.stringify(this.record.note.Text__c).replace(/\n/g, '<br />') Unfortunately, with this approach, the <br> tags are now showing up in the HTML template.
How can we display long text area line breaks from our salesforce database in our LWC HTML?