looks good, but if I used it I got "<br />"s written on the web page.
I used the following code:

RootPanel.get("textNews").getElement().setInnerText
(textareaNews.getText().replaceAll("(\r\n|\r|\n)", "<br />"));

By changing setInnerText to setInnerHTML all works fine

thanks

On Jul 29, 1:56 pm, Phil <[email protected]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to