i am trying this:
open google docs, new document, and type in: hello world
(world bolded)
then download it as html(zipped)
i unzip the html file, and save it to the assets folder in src folder of my Flex app
i have a Spark:TextArea instance and i want to do:
var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_FIELD_HTML_FORMAT);
myTextArea.textFlow = importer.importToFlow(htmlSource);
where htmlSource should point to the saved html file somehow
how do i do this? i tryed embedding, converting to ByteArrayAsset and to String, but i always get the source of the html file and not it's rendered rich text (ie "hello world).
this is what i c at runtime:
Untitled documentol{margin:0;padding:0}p{margin:0}.c0{color:#000000;font-size:11pt;font-family:Arial;font-weight:bold}.c3{line-height:1.15;text-indent:0pt;direction:ltr}.c2{color:#000000;font-size:11pt;font-family:Arial}开发者_开发问答.c1{background-color:#ffffff} hello world
am i clear? any help? thanx
I suggest taking a look at the Text Converter Reference to see what is supported, and also try using <s:RichText>
as well as <s:RichEditableText>
.
精彩评论