Intro

The formatted text control displays HTML text. You can format the text using HTML tags or embed formatted text.

Example

Example

When to Use

Use the formatted text control to:

  • Embed formatted HTML text.
  • Display longer texts, such as descriptions, legal texts, or manuals.
  • Display simple lists with bullet points or numbers.
  • Display code.

Do not use the formatted text control to:

  • Display In-app help or explanations on how to use your app. [internal_only]Use SAP Companion instead.[/internal_only]
  • Display a simple and short text. Use the text control instead.
  • Display a semantically-colored text or a status. Use the object status instead
  • Display an object name with or brief additional information. Use the object identifier instead.
  • Display a number or sum. Use the object number instead.
  • Display a currency. Use the currency control instead.
  • Display a label. Use the label control instead.
  • Display a single headline. Use the title control instead.
  • Let the user to type in longer texts and format them. Use the rich text editor instead.

Components

By default, the control uses the standard font and headlines. It supports the following HTML tags:

Text Styling

<div> <div>HTML Tag</div> <div>Effect</div> </div> <div> <div>a</div> <div>Link or anchor</div> </div> <div> <div>abbr</div> <div>Abbreviation</div> </div> <div> <div>bdi</div> <div>Bidirectional isolation of a certain text</div> </div> <div> <div>blockquote</div> <div>Quote</div> </div> <div> <div>cite</div> <div>Short quote</div> </div> <div> <div>code</div> <div>Code style</div> </div> <div> <div>dir</div> <div>Explicit text direction of a certain text</div> </div> <div> <div>em</div> <div>Italic text</div> </div> <div> <div>pre</div> <div>Preformatted text</div> </div> <div> <div>strong</div> <div>Bold text</div> </div>

List

<div> <div>HTML Tag</div> <div>Effect</div> </div> <div> <div>dl</div> <div>Description list</div> </div> <div> <div>dt</div> <div>Description term<br>(of a description list)</div> </div> <div> <div>ul</div> <div>Unordered list</div> </div> <div> <div>ol</div> <div>Ordered list</div> </div> <div> <div>li</div> <div>List item<br>(of an unordered or ordered list)</div> </div>

Structure

<div> <div>HTML Tag</div> <div>Effect</div> </div> <div> <div>br</div> <div>New line</div> </div> <div> <div>h1-h6</div> <div>Headlines 1-6</div> </div> <div> <div>p</div> <div>Paragraph</div> </div> <div> <div>span</div> <div>Generic inline container</div> </div>

Behavior and Interaction

The formatted text control itself is not interactive. However, it can contain interactive elements, such as links and anchors.

Responsiveness

The text automatically adapts to the screen size unless you set a fixed width and/or height.

Examples

Here are some examples that use the various HTML tags.

Formatted text - Numbered List

Formatted text - Numbered List

Formatted text - Bulleted list

Formatted text - Bulleted list

Formatted text with code

Formatted text with code

Formatted text - Quote

Formatted text - Quote

Top Tips

Elements and Controls

Implementation