Answered
Several questions on TLF
Question 1: Is it possible to tell EditManager to do
something on Enter key event and do not move text caret to the
lower line in the same time?
Question 2: Is it possible to tell EditManager to limit user input to some amount of characters, some thing similar to maxChars of the TextField?
Question 3: How to get text represented by the TextFlow in XML format with extra spaces?
For example: I write "Hello world" and then select world "Hello" and change its colour to blue. If I make text export form the TextFlow in XML format I get following:
<flow:TextFlow whiteSpaceCollapse="preserve" xmlns:flow=" http://ns.adobe.com/textLayout/2008">
<flow:p direction="rtl" marginLeft="2" marginRight="3" marginTop="5">
<flow:span color="0x6699">Hello</flow:span>
<flow:span>world</flow:span>
</flow:p>
</flow:TextFlow>
Which have no space before the word "world", as it should be (but in the same time I see on my screen that the space actually appears in the edit box between words "Hello" and "world" after I changed colour).
I use following operation to export:
XML.ignoreWhitespace = false;
var textXML:XML = new XML(TextFilter.export(tf, TextFilter.TEXT_LAYOUT_FORMAT, ConversionType.XML_TYPE));
Where "tf" is a variable that contains my TextFlow instance.
Question 2: Is it possible to tell EditManager to limit user input to some amount of characters, some thing similar to maxChars of the TextField?
Question 3: How to get text represented by the TextFlow in XML format with extra spaces?
For example: I write "Hello world" and then select world "Hello" and change its colour to blue. If I make text export form the TextFlow in XML format I get following:
<flow:TextFlow whiteSpaceCollapse="preserve" xmlns:flow=" http://ns.adobe.com/textLayout/2008">
<flow:p direction="rtl" marginLeft="2" marginRight="3" marginTop="5">
<flow:span color="0x6699">Hello</flow:span>
<flow:span>world</flow:span>
</flow:p>
</flow:TextFlow>
Which have no space before the word "world", as it should be (but in the same time I see on my screen that the space actually appears in the edit box between words "Hello" and "world" after I changed colour).
I use following operation to export:
XML.ignoreWhitespace = false;
var textXML:XML = new XML(TextFilter.export(tf, TextFilter.TEXT_LAYOUT_FORMAT, ConversionType.XML_TYPE));
Where "tf" is a variable that contains my TextFlow instance.
