TextConverter TLF string markup is incorrect
I am having trouble getting a textflow markup string out of a textarea component. Using a simple spark textarea and the following code I get the following markup string.
typ is the spark text area that houses the flow that I need converted and tlfText is a box to view the markup.
tlfTest.text = TextConverter.export(typ.textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE).toString();
This code seems to work in the example below:
http://blog.flexexamples.com/2009/07/25/exporting-a-textflow-object-in-flex-4/
I have essentially copied the conversion part of the example and am getting markup that looks like this:
<TextFlow whiteSpaceCollapse="preserve" version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008"><p><span></span></p></TextFlow>
This is for a blank window, but even when there is text with formatting it doesn't markup all the formatting. The paragraph and span elements always seem to be fine. However the higher level attributes are missing. Such as columnCount. Also the white space is always preserved and causing ugly looking documents on reload. I have tried to set the whitespace to collapse- but have continually failed.
My end goal is to get a markup string that I am saving to a database and can later reload- work on and then put back. The editing tools that I am using for the textarea are essentially the same as those in the example.
I am probably missing somthing simple- hopefully someone can point out my error easily. Thanks,
-Jonathan Rios
