TextConverter.importToFLow() and span style class
I'm trying to create a TextFlow object from generic HTML Text. There seems to be a problem with converting the span style class when having some tags inside the span:
Here's a code snippet to narrow the issue down:
var htmlText:String = '<SPAN CLASS="myclass"><b>foo</b>bar</SPAN>';
var textFlow:TextFlow = TextConverter.importToFlow(htmlText, TextConverter.TEXT_FIELD_HTML_FORMAT);
trace(TextConverter.export(textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.XML_TYPE));
The output is:
<p>
<span fontWeight="bold">foo</span>
<span styleName="myclass">bar</span>
</p>
As you can see, the foo span doesn't have a myclass style after conversion to text layout format.
I think this problem is related to the fact, that the TEXT_FIELD_HTML_FORMAT doesn't allow nested tags, and the <b>foo</b> being converted to a span too...
Any idea how to solve this?
