Rich Text Area Field Considerations

Learn considerations for Rich Text Area fields, including where you can use them, their character limits, and how Salesforce returns and handles content.

Required Editions

Available in: the Salesforce mobile app, Salesforce Classic, and Lightning Experience
Available in: Essentials, Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions

Availability

  • Rich Text Area fields aren’t available:
    • On compact layouts or in the Highlights Panel component
    • In self-service portals
  • External objects don’t support Rich Text Area fields.

Character Limits

  • Salesforce supports up to 131,072 characters for each Rich Text Area field, including the HTML tags. You can also set a lower limit.
  • An object can contain unlimited Rich Text Area and Long Text Area fields. However, your edition’s allocation for total custom fields allowed on an object applies, regardless of field type.
  • Each object can contain 1,638,400 characters across Long Text Area and Rich Text Area fields. The default character limit for a Long Text Area and Rich Text Area field is 32,768 (32 KB). The minimum character limit is 256. You can set a unique character limit when you create either of these field types.
  • You can’t paste special characters, such as bullets or curly quotes, into a rich text field from another application. It’s best to type or paste in plain text and use the rich text editor to format it.
  • The Rich Text Editor doesn’t support HTML code. The editor treats HTML code as text.
  • The character count includes HTML markup that isn’t visible in the editor. For example, bold formatting wraps text in <b></b> tags and adds 7 more characters. Paragraphs and line breaks also insert the <p></p> and <br> tags, which count against the character limit.

How Rich Text Content Is Returned and Handled

  • When you retrieve a Rich Text Area field value through the API, the value returns in HTML format. The returned values include any stored HTML tags.
  • Because the value returns as HTML, some special characters are escaped when the field value is retrieved through the API. For example, & returns as &amp; and < returns as &lt;. For the full list of escaped characters, see Editing Rich Text Area Fields in Records.
  • HTML tag handling varies by context.
    • Formula processing strips out HTML tags before the formula runs.
    • Reports exclude HTML tags and special formatting from the results. For example, <b>some</b> <i>text</i> appears as some text.
    • Mail merges include HTML tags as text in the resulting document but don’t merge images.

Formatting and Toolbar Differences

Rich text editors for custom fields in Lightning Experience and the Salesforce mobile app differ in a few ways from the editors in Salesforce Classic. See Editing Rich Text Area Fields in Records.

Images and Hyperlinks

  • You can’t turn off specific Rich Text Area features. For example, you can't turn off support for hyperlinks or images on certain fields.
  • You can’t upload an image to a Rich Text Area field using the file:// protocol in the URL field. Instead, use http:, https:, data:, //, /, or a relative URL.
  • When uploading an image to a Rich Text Area field, enter a valid and well-formed URL.
  • When you delete an image from a Rich Text Area field, the image is still accessible in your org for 15 days. After that, it’s automatically and permanently deleted.

Reports

  • In report filters, the ‘contains’ operator supports only the first 254 characters of a Rich Text Area or Long Text Area field.
  • You can't use a filter on a Rich Text Area field for locales and languages that use multibyte characters.
  • Reports show the first 999 characters in a standard Rich Text Area or Long Text Area field. Custom fields show only the first 254 characters. If you download the report as Details Only, the entire field is available.