Hi Richard,
while loading for the first time I have below markup:
<TextFlow whiteSpaceCollapse="preserve" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" lineBreak="inherit" verticalAlign="middle" xmlns="http://ns.adobe.com/textLayout/2008">
<p textAlign="center">
<span fontFamily="Verdana" fontSize="41" color="0x0" LETTERSPACING="0" KERNING="0">
For Flash 10 Please Do not Delete This Template
</span>
</p>
</TextFlow>
after I make "Flash" Italic the markup becomes:
<TextFlow whiteSpaceCollapse="preserve" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" lineBreak="inherit" verticalAlign="middle" xmlns="http://ns.adobe.com/textLayout/2008">
<p textAlign="center">
<span fontFamily="Verdana" fontSize="41" color="0x0" LETTERSPACING="0" KERNING="0">
For
</span>
<span fontFamily="Verdana" fontStyle="italic" fontSize="41" color="0x0" LETTERSPACING="0" KERNING="0">
Flash
</span>
<span fontFamily="Verdana" fontSize="41" color="0x0" LETTERSPACING="0" KERNING="0">
10 Please Do not Delete This Template
</span>
</p>
</TextFlow>
If we notice here it removes the space after "For" in first <span> and space before "10" in last <span>.
I am getting these after I export this when I am done with Italic on word "Flash".
For exporting I am using below code:
var exportXML:XML = XML(TextFilter.export(textFlow,TextFilter.TEXT_LAYOUT_FORMAT,ConversionType.XML_TYPE));
Please let me know if I am making any mistake in this. My TLF version is 442 and Flex SDK is 3.2.
Regards,
Rajesh
Its not going to work to support the round trip import/export with the spans on separate lines nicely indented.
Our test app wraps the export like this:
const xmlBoilerPlate:String = '<?xml version="1.0" encoding="utf-8"?>\n';
var originalSettings:Object = XML.settings();
try
{
XML.ignoreProcessingInstructions = false;
XML.ignoreWhitespace = false;
XML.prettyPrinting = false;
var exporter:ITextExporter = TextFilter.getExporter(format);
var xmlExport:XML = exporter.export(defaultFlow, ConversionType.XML_TYPE) as XML;
var result:String = xmlBoilerPlate + xmlExport;
XML.setSettings(originalSettings);
}
catch(e:Error)
{
XML.setSettings(originalSettings);
throw(e);
}
The importer does this for you.
Hope that helps,
Richard