public class RichText extends Object implements TextField
This class represents a rich text field that can be embedded within a display template.
Supported markup includes:| Name | Element | Example Markup | Output |
| Line Break | <br/> |
First line<br/>
Second line |
First line Second line |
| Bold | <b> |
This is a <b>ladybird</b> beetle |
This is a ladybird beetle |
| Italics | <i> |
Scientific name <i>Coccienellidae</i> |
Scientific name Coccienellidae |
| Underline | <u> |
Always <u>feed</u> your ladybird tasty aphids. |
Always feed your ladybird tasty aphids. |
| Font | <font> |
<font size="1">Font size 1 <!--28px--></font><font size="2">Font size 2 <!--28px--></font><font size="3">Font size 3 <!--32px--></font><font size="4">Font size 4 <!--32px--></font><font size="5">Font size 5 <!--32px--></font><font size="6">Font size 6 <!--32px--></font><font size="7">Font size 7 <!--68px--></font> |
Font size 1
Font size 3 Font size 7 |
| Action | <action token="VALUE"></action> |
Learn the <action token="2347">history</action> of ladybirds. |
Learn the history of ladybirds. |
| Constructor and Description |
|---|
RichText() |
| Modifier and Type | Method and Description |
|---|---|
String |
getText()
Returns the text for this field.
|
void |
setText(String richText)
Sets the rich text on this field.
|
Copyright © 2017. All rights reserved.