How to add linefeed or newline in description?
Hi,
This is RAM version is v7.2.0.1, I have a long string with line feeds characters in it to break the string into a few lines, I have it print the string out on the java console and it appears the linefeed works. But when assign it to newAsset.setDescription(String), on the web client, the description section appear not having any linefeeds or new lines, it appear to be one long string. I have tried both "\n" and "\r\n" and both failed to appear. Thanks! JR. |
6 answers
Have you tried encoding it in hex?
Hi, |
You can include HTML in your description. For a new line, you could use a <br> tag.
newAsset.setDescription("line 1<br>line 2"); |
Reply to Chris message:
Did you try it yourself before you suggest this? I just tried it, it got worst, all appear in Hex codes. Have you tried encoding it in hex? Hi, |
Yes Sheehan, your suggestion works but not Chris's.
Thanks SheeHan You can include HTML in your description. For a new line, you could use a <br> tag. |
No, sorry I didn't try it. It came straight out of one of the examples.
Silly me... :-) -Chris Reply to Chris message: Have you tried encoding it in hex? Hi, |
Remember that on the web, the description is rendered as HTML ... so line feeds and such are ignored by the browser.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.