The FormattedTextView (CL_WD_FORMATTED_TEXT=>E_TYPE-FORMATTED_TEXT) supports the tags listed in the following table. Note that the entries are case-sensitive.
Tags that are not supported cannot be filtered out, which means the text will be displayed without SAPScript format.
XHTML Text Module Tags
Tag | Description |
---|---|
abbr |
Abbreviation |
acronym |
Acronym |
Address |
Format as address |
blockquote |
Blockquote |
br |
Line break |
cite |
Cite |
code |
Inline Code |
dfn |
Definition |
div |
Div |
em |
Emphasis |
h1 |
Header Level 1 *1 |
h2 |
Header Level 2 *1 |
h3 |
Header Level 3 *1 |
h4 |
Header Level 4 *1 |
h5 |
Header Level 5 *1 (not supported) |
h6 |
Header Level 6 *1 (not supported) |
kbd |
Text to be entered via Keyboard |
p |
Section symbol |
pre |
Pre formatted text |
q |
Quotation |
samp |
Sample (block) |
span |
Span |
strong |
Strong |
var |
text that is a variable |
* Header tags must be on the top level.
For more information, see: http://www.w3.org/TR/html4/struct/text.html
XHTML List Module Tags
Tag | Description |
---|---|
dl |
Definition list |
dt |
Definition topic |
dd |
Definition item |
ol |
Ordered list (numbered list) |
ul |
Unordered list (bullet list) |
li |
List item for "ol" and "ul" |
See also http://www.w3.org/TR/html4/struct/lists.html
Special Tags
Tag | Description |
---|---|
formattedText |
Root tag of the FormattedTextView |
a |
Anchor (for links) |
img |
Picture |
sap:action |
Placeholder for an action (currently not yet supported), see also Formats of UI Element Explanation |
sap:field |
Placeholder for a field |
You have access to the tag name through CL_WD_FORMATTED_TEXT=>E_TAG (for example: CL_WD_FORMATTED_TEXT=>E_TAG-ABBR)
Syntax:
<a href="Reference" [Titel="Tooltip"]>FormattedText</a>
Parameters:
A text specified as a reference.
Text for the quick info.
Formatted text.
The "a" tag displays a link with the formatted text as the text of the link. When the link is clicked on, the event FormattedTextView.onAction is triggered. The "href" parameter of the clicked on link is provided in the event parameter "href".
The FormattedTextView does not display a URL automatically when a link is clicked on, even if "href" contains an http URL.
Syntax:
<img src="ImageSource" [title="Tooltip"]/>
Parameters:
URL of image.
Text for the quick info.
The "img" tag displays an image. ImageSource is interpreted like the attribute source of the UI element Image.
Syntax:
<sap:field name="AttributeName"/>
Parameters:
An attribute of FormattedTextView.dataSource
The "sap:field" tag is replaced by the value (output representation) of the context attribute that is specified by the name attribute. The attribute is taken from the lead selection element of the context node that is specified by FormattedTextView.dataSource.