cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 Label to display ++ as SuperScript

cguttikonda24
Participant
0 Kudos

Need to display ++ as superscript for a label in SAP UI5. My initial approach was to extend the standard label control and have the property text as sap.ui.core.HTML type, but couldn't go forward. Need suggestions and if possible code example to do so.`

Im using n XML view for display.

<code>sap.m.Label.extend("mylabel.Label", {  
// the control API:
library : "sap.m",
metadata: {
aggregations: {
superScript: 'sap.ui.core.HTML'
},
properties: {
text: {
type: "sap.ui.core.HTML"
}
}
},
renderer: function(oRM, oControl) { // static function

sap.m.LabelRenderer.render(oRM, oControl);

}

});

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member365727
Active Contributor
0 Kudos

use HTML tags inside XML view...

<core:HTML content="<p>This text contains <sup>superscript</sup> text.</p>" />

output will be

This text contains superscript text.