As per the SFDC documentations below, it should allow the new line chars (\r\n) but no luck, any idea: https://developer.salesforce.com/docs/component-library/bundle/lightning-formatted-text/example

<lightning-formatted-text value="Email \n  salesforce.com and info.salesforce.com" ></lightning-formatted-text>

output: Email \n salesforce.com and info.salesforce.com

1 Answer 1


add the field in your js like

textValue = "Email \n salesforce.com and info.salesforce.com";

then in the template :

<lightning-formatted-text value={textValue} linkify ></lightning-formatted-text>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .