@namespace "library://ns.adobe.com/flex/spark"; Label { baseColor: #000000; fontFamily: "Verdana"; fontSize: "12"; advancedAntiAliasing: true; } xmlns="http://ns.adobe.com/textLayout/2008" var markup:String = "

This is TLF markup with paragraphs.

The root TextFlow tag is inlcuded.

"; rt1.textFlow = TextFlowUtil.importFromString(markup); // This next string shows that if the root TextFlow tag is omitted, it will be added for you. markup = "

This is TLF markup with paragraphs.

The root TextFlow tag is omitted and therefore created automatically.

"; rt2.textFlow = TextFlowUtil.importFromString(markup); // This line shows how you would import plain text with no paragraph spacing var autoMarkup:String = "This is just a plain old string that has no markup within it."; RichEditableText(rt3.textDisplay).textFlow = TextFlowUtil.importFromString(autoMarkup); // This example shows how you can use the TextConverter class from TLF to import HTML formatted text // See the docs for the subset of HTML that is supported: // http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/conversion/TextConverter.html#TEXT_FIELD_HTML_FORMAT var myHTML:String = "

This is HTML markup.
Hello Tour de Flex Users!

"; rt4.textFlow = TextConverter.importToFlow(myHTML,TextConverter.TEXT_FIELD_HTML_FORMAT); } ]]>