Output Text Area (Deprecated)

ui:outputTextArea

Deprecated as of API version 47.0. We recommend migrating to Lightning Web Components and using the lightning-formatted-text component.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App, Lightning Out (Beta), Standalone Lightning App

Deprecation Guidelines 

We recommend using Lightning Web Components whenever possible. When migrating to Lightning Web Components, use lightning-formatted-text.

For more information, see Aura Components in the ui Namespace Are Deprecated.

Usage Overview (Deprecated) 

A ui:outputTextArea component represents text output that is wrapped in an HTML span tag. We recommend using lightning:formattedText instead of ui:outputText.

ui:outputTextArea can be used with ui:inputTextArea, which takes in a multiline text input. To apply Lightning Design System styling, we recommend that you use lightning:textarea instead of ui:inputTextArea.

To display text, you can use an attribute value and bind it to the ui:outputTextArea component. A ui:outputTextArea component displays URLs and email addresses as hyperlinks.

1<aura:attribute name="myTextArea" type="String" default="some string" />
2
3<ui:outputTextArea value="{!v.myTextArea}" />

The previous example renders the following HTML.

1<span class="uiOutputTextArea">some string</span>

To display record data for Salesforce objects, use lightning:outputField with lightning:recordViewForm, or use lightning:recordForm. To display record data with a custom layout, use force:recordData.

Note

Attributes 

NameDescriptionTypeDefaultRequired
bodyThe body of the component. In markup, this is everything in the body of the tag.Aura.Component[]
classA CSS style to be attached to the component. This style is added in addition to base styles output by the component.String
linkifyIndicates if the URLs in the text are set to render as hyperlinks.Booleantrue
valueThe text to display.String