0

I have my code like below in aura component, where an lighting:textarea is used to display long text area field in multiple lines

<lightning:textArea aura:id="{!question.fieldAPIName}" name="{!question.fieldAPIName}" label="{!question.questionLabel}" value="{!question.fieldValue}"/>

when I give input to the field:

enter image description here

when I display in it in detail page it comes in a single line like below.

enter image description here

I tried to handle "\n" in my controller by replacing the "\n" value with "
" (rec.fieldValue).replace('<br/>','\n'); but it didnt work in the edit , it is showing as

  "1<br/>2<br/>3<br/>"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.