Styled Text

Styled Text

Function: a!richTextItem()

Displays styled text within a rich text component.

Parameters

Name Keyword Type Description
Text text Text or Styled Text Array of text to display as a rich text item.
Style style Text Array Determines the style to apply to the text value. Valid values include "PLAIN" (default), "EMPHASIS", "STRONG", and "UNDERLINE".
Size size Text Determines the text size. Valid values: "STANDARD" (default), "SMALL", "MEDIUM", "LARGE".
Color color Text Determines the text color. Valid values: Any valid hex color or "STANDARD" (default), "ACCENT", "POSITIVE", "NEGATIVE", "SECONDARY".
Link link Link Link to apply to the text. Create links with
Link Style linkStyle Text Determines how the link is underlined. Valid values: "INLINE" (default), "STANDALONE".
Visibility showWhen Boolean Determines whether the component is displayed on the interface. When set to false, the component is hidden and is not evaluated. Default: true.

Notes

  • If Text is null or contains an empty array, no text is displayed.
  • If Link is null, the Text is not displayed as a link.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
=a!richTextDisplayField(
  labelPosition: "COLLAPSED",
  value: {
    a!richTextItem(
      text: "Plain, ",
      style: "PLAIN"
    ),
    a!richTextItem(
      text: "Emphasis Small, ",
      style: "EMPHASIS",
      size: "SMALL"
    ),
    a!richTextItem(
      text: "Underline Medium, ",
      style: "UNDERLINE",
      size: "MEDIUM"
    ),
    a!richTextItem(
      text: "Strong Large, ",
      style: "STRONG",
      size: "LARGE"
    ),
    a!richTextItem(
      text: "Mixed Large",
      style: {"EMPHASIS","STRONG","UNDERLINE"},
      size: "LARGE"
    )
  }
)

Displays the following:

Styled Text Example

Open in Github

On This Page

FEEDBACK