Copy/Paste within TextFlow
I'm using a TextFlow with added controllers by using textFlow.flowComposer.addController(controller).
When I paste text from other programs (like firefox or word) the text gets wrong formating (expecting the same formating as the text surrounding it).
One solution could be to catch the paste-event and do something with it, but it doesn't show up on either the TextFlow-object or the containers inside of it.
The code I'm using for the textflow is (using FlashDevelop):
textFlow.addEventListener(Event.PASTE, function (event:Event):void {
var clip:String = Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT) as String;
FlashConnect.trace(clip, TraceLevel.DEBUG);
});
The code I'm using for each container is (using FlashDevelop):
container.addEventListener(Event.PASTE, function (event:Event):void {
var clip:String = Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT) as String;
FlashConnect.trace(clip, TraceLevel.DEBUG);
});
