How about simply using String's replaceAll() method?
String html = textArea.getText().replaceAll("(\r\n|\r|\n)", "<br/>");On Jul 28, 5:04 pm, Tobe <[email protected]> wrote: > Hi, > how can I activate that new lines in a TextArea become breaks directly > on the web page? In short I need the nl2br() function from PHP in GWT. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
