Class sap.m.FormattedTextModule: sap/m/FormattedText
The FormattedText control allows the usage of a limited set of tags for inline display of formatted text in HTML format.
Since: 1.38.0.
sClassName
and enriches it with the information contained in oClassInfo
.disableStyleAttribute
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- htmlText : string (default: )
- width : sap.ui.core.CSSSize
- height : sap.ui.core.CSSSize
- disableStyleAttribute : boolean (default: false)
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
{string} | sId? | ID for the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
disableStyleAttribute
. Disables rendering of the style
attribute in the FormattedText
.
Default value is false
.
{boolean} | Value of property disableStyleAttribute |
height
. Optional height of the control in CSS units.
{sap.ui.core.CSSSize} | Value of property height |
htmlText
. Text in HTML format. The following tags are supported:
a
abbr
blockquote
br
cite
code
em
h1
h2
h3
h4
h5
h6
p
pre
strong
span
u
dl
dt
dl
ul
ol
li
class, style,
and target
attributes are allowed. If target
is not set, links open in a new window by default.
Only safe href
attributes can be used. See jQuery.sap.validateUrl.
Default value is .
{string} | Value of property htmlText |
width
. Optional width of the control in CSS units.
{sap.ui.core.CSSSize} | Value of property width |
disableStyleAttribute
. Disables rendering of the style
attribute in the FormattedText
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bDisableStyleAttribute | New value for property disableStyleAttribute |
{sap.m.FormattedText} | Reference to this in order to allow method chaining |
height
. Optional height of the control in CSS units.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.CSSSize} | sHeight | New value for property height |
{sap.m.FormattedText} | Reference to this in order to allow method chaining |
{string} | sText | HTML text as a string |
width
. Optional width of the control in CSS units.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.m.FormattedText} | Reference to this in order to allow method chaining |