<lightning:textarea value="line 1 \r \n line 2" label="" maxlength="300" /></td></tr>
How can I change the value to have different lines so that 'line 1' has its own line and 'line 2' is on its own line. Currently it looks like
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this community<lightning:textarea value="line 1 \r \n line 2" label="" maxlength="300" /></td></tr>
How can I change the value to have different lines so that 'line 1' has its own line and 'line 2' is on its own line. Currently it looks like
Just put in multiple lines like this:I have used enter key in between line 1,2 and 3
<lightning:textarea value="line 1
line 2
line 3" label="" maxlength="300" />
for setting through javascript just add "\n"
var valz = "123"+"\n"+"456";
component.set("v.textareaval",valz);
bind this attribute to textarea component