1 Reply Latest reply on May 11, 2009 6:59 PM by Michael Borbor

    Getting selected text

    ShaF10 Level 1

      Hi Guys


      I am trying to format some selected text. I select some text and want to make it bold. This is what I have so far:

              private function taBold():void {
                  // do something
      <mx:Button id="bold" label="bold" click="taBold()"/>

      It would have been straightforward if an event was being registered for the text selection because then I could use the setSelection and place the text into a textRange and do whatever formatting that needed to be done. But as you can see the taBold() function is being called but no args are being passed onto it, which leads me to ask, how can I retrieve the selection of text ?