Equivalent of applyLeafFormat() for SelectionManager?
Hi-
I'm trying to add the ability for users to select a chunk of text in a textflow, and then we'll highlight it (i.e., change the backgroundColor and backgroundAlpha). I can make this working following the basic premise from the SimpleEditor sample:
var cf:TextLayoutFormat = new TextLayoutFormat();
cf.backgroundColor = 0xff0000;
cf.backgroundAlpha = 1;
IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
_textFlow.interactionManager.setFocus();
But that example works with an EditManager as the interactionManager. We do not want users to be able to edit the textflow, though.
So, there are two pathways, and I don't know how to do either one:
1. Could I have an EditManager, but dis-allow all interactions that would lead to the content of the text changing?
2. Can I get the selected range from a SelectionManager and apply text formatting to that range?
(I'm using rev 460 right now, if that matters.)
Thanks!
-Matt
