2 Replies Latest reply on Jun 19, 2007 11:37 AM by mourning2night

    Recognizing linebreaks \n in strings

    mourning2night
      Hi All,
      I know this is a newbie question but I can't find an answer. I am setting the title of a RichTextEditor with a string I load dynamically.

      For example:
      myRichTextEditor.title = event.result as String;

      displays: "this is the first line \n this is the second line \n this is the first line" all on one line.

      but if I input the string directly it works fine:

      var resultsString:String = "this is the first line \n this is the second line \n this is the first line";
      myRichTextEditor.title = resultsString;


      displays:
      "this is the first line
      this is the second line
      this is the first line"

      So how do I get the the dynamic string (event.result) to evaluate and insert the linebreaks?

      Thanks, KG