on 07-05-2016 10:02 AM
Hi All,
Following is the code I used to make some part of text in text area Bold.
new sap.ui.commons.TextArea({
cols : 43,
rows : 4,
visible : true,
enabled : false,
value: { parts:[
{path: 'uidata>loggedInUserName'},
{path: 'uidata>commentDate'},
{path: 'uidata>loggedInUserComments'}
],
formatter: function(caseId,custNo,title) {
var boldc=caseId.bold();
return boldc+" --- "+custNo.bold()+"\n"+title;
return caseId+" --- "+custNo+"\n\n"+title;
}
},
})
It didn't work. Can anyone help?
Thanks in advance
Hi Sudarshan,
Actually, you can place only text content inside a TextArea and you cannot place HTML tags.
You were using .bold() method which returns the text in the following format:
<b>Some Text</b>
The text area element will display the same as above and it will not convert the font weight to bold which is expected in normal div element.
In your case, I see you need to display first line of text in bold and the next line in normal. So, why don't you use Pseudo-classes of CSS?
I have tried to create a sample and hopefully it meets your requirement: JS Bin - Collaborative JavaScript Debugging
Regards,
Sai.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sudarshan,
Don't be sorry!
No one is an expert here, everyone are learning new things day by day.
I remember a quote from Nicholas Butler (American Philosopher):
'An expert is one who knows more and more about less and less until he knows absolutely everything about nothing'
Have a great day ahead!
Regards,
Sai.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.