这可以使用 来执行TextFlow
,显示为:
用作composer来组装html:TextConverter
importToFlow()
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Script>
<![CDATA[
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.TextFlow;
private const text:String = "<img src='http://www.google.com/images/srpr/logo4w.png' " +
"align='right' width='138' height='48' />Lorem ipsum dolor sit amet, " +
"consectetur adipiscing elit. Nunc sodales posuere elit nec convallis. " +
"Vivamus lacinia consectetur tortor, in convallis diam ornare sit amet. " +
"Morbi volutpat volutpat aliquet. Praesent hendrerit nibh et magna feugiat " +
"laoreet. Maecenas congue rhoncus tincidunt. Aliquam libero dui, scelerisque " +
"eu convallis at, consectetur vitae dolor. Nunc quis posuere tellus.";
]]>
</fx:Script>
<s:RichEditableText editable="false"
selectable="true"
textFlow="{TextConverter.importToFlow(text, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
buttonMode="true"
width="100%"
height="100%" />
</s:Application>
请注意,AIR 也有StageWebView
,它使用设备操作系统提供的系统 Web 控件。