Activity Forums Salesforce® Discussions what is the use of lightning:formattedText in Salesforce lightning component?

  • Ashutosh

    Member
    September 25, 2019 at 1:27 pm

    A lightning:formattedText component displays a read-only representation of text, wrapping URLs and email addresses in anchor tags (also known as "linkify"). It also converts the r or n characters into <br /> tags.

    To display URLs and email addresses in a block of text in anchor tags, set linkify="true". If not set, URLs and email addresses display as plain text. Setting linkify="true" wraps URLs and email addresses in anchor tags with target="_blank". URLs and email addresses are appended by http:// and mailto:// respectively.

    For Example:
    <aura:component>
    <lightning:formattedText linkify="true" value="I like salesforce.com and trailhead.salesforce.com." />
    </aura:component>

Log In to reply.

Popular Salesforce Blogs

Success Stories – How DemandBlue Helped Its Clients Improve Revenue Recognition with Salesforce Revenue Cloud Implementation

Blog in

Businesses that deal with subscription-based contracts, usage-based billing or other complex contracts face several difficulties in managing their billing cycle. Though Salesforce CPQ implementation does the heavy-lifting…

Popular Salesforce Videos