I am just wondering... Is there an optimal way to keep "new line" formatting in TextArea? I mean when for example:
UI something like:
------------
|Hello world | line A (\\n)
|Hello world | line B (\\n)
|... | line i (\\n)
------------
String t=ta.getText();
... so t is missing all ta "new line(s)" ; As a result t value is
Hello worldHello world...
So my question is...
How to keep "new line" format for getText() method? Or maybe there some more optimal way?
I am not pretty sure is the GWT's TextArea supports \\n
lines separator. But is there a way to catch new line on fly I mean on user presses 'Enter' button? If I get text on 'Enter' was pressed no formatting is been kept. The only thing I get is a straight string but I want somehow keep line separation marks or something to restore text as it was originally in TextArea component
Thanks