I am currently having a dificulty in getting my custom-made Flex 3 RichText based on TLF 3.0 to work correctly.
If you look at the "TLF Editor (Advanced)" in Tour De Flex, whenever you highlight the text and then hit one of the text-styling buttons, for example bold, the text will be bolded, as expected, and the highlight stays.
My custom RichText has the same setup: left pane is the text editor and right pane is the text-styling-UI buttons.
The difficulty that I got is getting the text stays highlighted when the user hits one of the text-styling-UI buttons.
I just couldn't figure out how the text could stays highlighted in "TLF Editor (Advanced)" example.
I actually got the "TLF Editor (Advanced)" code and got it to run on Flex Builder 4 but I still couldn't figure out what made the highlight stays.
I appreciate any input on this.
Again, I am building a Flex 3 RichText component based on TLF 3.0.
And I am using Flex SDK: 3.6.
Hi Jin Huang,
I am not sure that I understand on the handler for the highlight. I am using whatever the default is by the textLayout framework.
For the text-styling, here's an example:
var pa:TextLayoutFormat = new TextLayoutFormat();
pa["fontWeight"] = "bold";
(_textFlow.interactionManager as EditManager).applyParagraphFormat(pa);
Appreciate your help Jin Huang.