Blogs
Lightning-formatted-text
The primary purpose of lightning-formatted-text is to display plain, read-only text content in a safe and consistent way within Salesforce Lightning Web Components. It allows developers to present user-facing text while automatically handling link detection, line breaks, and security concerns such as cross-site scripting (XSS). This component removes the need for custom parsing or formatting logic and ensures that text content follows Salesforce Lightning Design System (SLDS) and accessibility standards.