I need to format specific text lines in the "TextArea" tag of my SAP Fiori App in italic.
The data for my text area is retrieved from a SAP OData Service as an Array. I am currently displaying the data using a loop and setting it as follows in my JavaScript code:
var tempcomm = this.getView().byId("txtArea");
oModel.setData({
text_listSet : data //where 'data' contains the final data
});
tempcomm.setModel(oModel);
Below is a sample of the XML View code:-
<TextArea id="txtArea"
value="{/text_listSet}"
height="20rem" growing="true" editable="false" />
Current output:-
test Line 1.
ok, good - line 2.
test Line 3.
ok, good - line 4.
Desired output:-
test Line 1- formatted in italic style.
ok, good - line 2.
test Line 3 - formatted in italic style.
ok, good - line 4.
Note:- The Text Area is set to be non-editable.