Rich Text Editors for Custom Fields Get a New Look

We revived rich text editors in custom fields so that you can continue to work with formatted content in records. Rich text editors had been disabled when the LockerService critical update was active. The new version has some visual and formatting differences from the rich text editor that you were familiar with. This change applies to Lightning Experience and all versions of the Salesforce1 mobile app.

No changes have been made to rich text editors in Salesforce Classic. You get the following features in Lightning Experience and Salesforce1.

  • Format text as bold, italicized, underlined, or strikethrough
  • Create bulleted and numbered lists
  • Change paragraph indentation
  • Insert a hyperlink
  • Insert an image
  • Remove formatting
Rich text editor in Lightning Experience

The new rich text editors for custom fields in Lightning Experience and Salesforce1 have the following differences, as compared to the rich text editors in Salesforce Classic.

  • The text alignment buttons (1) are displayed after the list and indentation buttons.
  • The Remove Formatting button (2) clears text formatting.
  • The default font family (3) is Salesforce Sans, Arial, sans-serif, instead of Arial, Verdana, Trebuchet MS, sans-serif.
  • The Undo and Redo buttons are no longer available. You can use keyboard shortcuts to undo and redo content formatting. In Windows, undo your last action by pressing Ctrl+Z, and reverse your last undo by pressing Ctrl+Y. On Mac OS, use Cmd+Z and Cmd+Y. Alternatively, use the Edit menu in your browser to undo or redo your changes.
Note

Note

We recommend using the toolbar to format your content. The rich text editor provides only a WYSIWYG interface. You can’t edit HTML tags. When you copy content from a web page or another source and paste it into the editor, unsupported tags are removed. Text that was enclosed in unsupported tags is preserved as plain text.

Formatting Support

The power of the rich text editor is in its WYSIWYG interface, therefore type in the editor and use the toolbar to format your content as much as you can. When you paste formatted content from another source, you can expect some formatting differences in Lightning Experience and Salesforce1. Here are formatting considerations to look out for.

Warning

Warning

If you add a custom rich text area field in Salesforce Classic and edit it in Lightning Experience, you can also expect the formatting differences. Saving your changes in Lightning Experience overwrites the original formatting you had in Salesforce Classic and conversely. Alternatively, you can fix some of the formatting using the toolbar or switch to Salesforce Classic to perform your edits.

Definition lists

Formatting for definition lists is preserved, but the styling appears different in Lightning Experience and Salesforce1. Definition terms are not bold.

Fonts

Pasting text with a predefined font face, color, or size converts the font tag into a span tag with the style attribute.

Headings
Inline styles on h1, h2, h3, h4, h5, and h6 tags are not supported and are ignored.
Hyperlinks
Hyperlinks always open in a new window or tab in Lightning Experience and Salesforce1. If you enter a hyperlink with a different target value in Salesforce Classic and edit the rich text field in Lightning Experience or Salesforce1, the target value is converted to _blank.
Inline styles
In Salesforce Classic, inline styles are supported on div, span, p, br, and hr tags. In Lightning Experience and Salesforce1, inline styles are supported only on span tags.
Lists
Nesting a bulleted list within a numbered list and nesting a numbered list within a bulleted list are not supported. Nesting a numbered list within a bulleted list (4) converts the numbered list into a bulleted list (5) when it’s pasted into the editor, while nesting a bulleted list within a numbered list (6) converts the bulleted list into a numbered list (7).

Numbered list within a bulleted listBulleted list within a numbered list

Warning

Warning

If you edit an existing rich text area field containing a nested list of a different type in Lightning Experience and Salesforce1, the nested list is converted to the same type as its parent list as described previously. Look for continued improvements for nested lists in future releases.

Nested lists of the same type are supported. However, pasting a nested list into the editor flattens the list into one list in Lightning Experience and Salesforce1. For example, a nested bulleted list within a bulleted list (8) becomes a single bulleted list (9) when pasted. For nested lists of the same type, as shown by (8) and (9), use the toolbar to adjust your list formatting. You can also press the Tab key or Shift+Tab to create a nested list item or remove a nested list item.

Nested bulleted lists

Note

Note

In Lightning Experience and Salesforce1, pasting lists that are copied from Microsoft® Word is not supported and results in list items getting converted into paragraphs. Although they look visually like lists, they are pasted as p tags.

Paragraphs
Pressing the Enter key creates a paragraph, which adds padding to the text when saved in Lightning Experience and Salesforce1.
Tables
In Salesforce Classic, Lightning Experience, and Salesforce1, pasting of tables is supported but you can edit only the content within the tables.
Text-level markup
  • Addresses with address tags cause enclosing list formatting to be removed.
  • Nested quotes using q tags are not supported.
  • Strikethrough text with strike tags are converted to s tags.
  • Teletype text with tt tags are converted to code tags.

This table lists supported HTML tags and formatting considerations in Lightning Experience and Salesforce1. When you edit a rich text field or paste text with unsupported tags Lightning Experience and Salesforce1, those tags are removed. Text that was enclosed in unsupported tags is preserved as plain text.

HTML Tags Supported in Salesforce Classic Supported in Custom Fields in Lightning Experience and Salesforce1? Comments for Lightning Experience and Salesforce1
a Checkmark denoting support The target attribute is always set to _blank. This tag is removed if href has no value.
abbr Checkmark denoting support
acronym This tag is converted into an abbr tag.
address Checkmark denoting support When text with this tag is nested in a list and pasted in the editor, the list tags,ol, li, and ul, are removed. Some tags before the address tag get nested in address.
b Checkmark denoting support
bdo Checkmark denoting support
big Checkmark denoting support
blockquote Checkmark denoting support Consecutive block quotes are merged.
br Checkmark denoting support
caption Checkmark denoting support
cite Checkmark denoting support
code Checkmark denoting support
col Checkmark denoting support
colgroup Checkmark denoting support
dd Checkmark denoting support
del Checkmark denoting support
dfn Checkmark denoting support
div Checkmark denoting support
dl Checkmark denoting support
dt Checkmark denoting support Definition terms are not bold.
em Checkmark denoting support
font Pasting text with a predefined font face, color, or size converts the font tag into a span tag with the style attribute.
h1 Checkmark denoting support Inline styles on headings are not supported.
h2 Checkmark denoting support Inline styles on headings are not supported.
h3 Checkmark denoting support Inline styles on headings are not supported.
h4 Checkmark denoting support Inline styles on headings are not supported.
h5 Checkmark denoting support Inline styles on headings are not supported.
h6 Checkmark denoting support Inline styles on headings are not supported.
hr Checkmark denoting support
i Checkmark denoting support
img Checkmark denoting support
ins Checkmark denoting support
kbd Checkmark denoting support
li Checkmark denoting support Pasting a nested list of the same type flattens the list into one list, for example, a nested bulleted list within a bulleted list. Use the toolbar to adjust your list formatting.
ol Checkmark denoting support Nesting an ordered list (numbered) in an unordered list (bulleted) converts the ordered list into an unordered list.
p Checkmark denoting support
pre Checkmark denoting support
q Checkmark denoting support Nested quotes are not supported.
s Checkmark denoting support
samp Checkmark denoting support
small Checkmark denoting support
span Checkmark denoting support This tag is nested in a p tag, which adds extra padding around the text.
strike Checkmark denoting support This tag is converted into an s tag and is visually the same.
strong Checkmark denoting support
sub Checkmark denoting support Nested sub tags are merged.
sup Checkmark denoting support Nested sup tags are merged.
table Checkmark denoting support
tbody Checkmark denoting support
td Checkmark denoting support
tfoot Checkmark denoting support
th Checkmark denoting support
thead Checkmark denoting support
tr Checkmark denoting support
tt This tag is converted into a code tag.
u Checkmark denoting support
ul Checkmark denoting support Nesting an unordered list (bulleted) in an ordered list (numbered) converts the unordered list into an ordered list.
var Checkmark denoting support