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
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.
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.
- Definition lists
Formatting for definition lists is preserved, but the styling appears different in Lightning Experience and Salesforce1. Definition terms are not bold.
- Inline styles on h1, h2, h3, h4, h5, and h6 tags are not supported and are ignored.
- 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.
- 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).
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.
- Pressing the Enter key creates a paragraph, which adds padding to the text when saved in Lightning Experience and Salesforce1.
- 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.