Remove line breaks from pasted text in Spark TextArea
I'm trying to remove all line breaks from the text that is pasted into the Spark TextArea.
I have:
<s:TextArea id="inputSearchQuery"
width="100%" height="22"
minHeight="22" maxHeight="196"
changing="onInputSearchQueryChanging(event)"/>
And handler:
private function onInputSear开发者_如何转开发chQueryChanging(evt:TextOperationEvent = null):void {
if (evt.operation is PasteOperation) {
}
}
Where can I find a text that user pasted? As I understand, this text should be in evt.operation.textFlow but it is not... I'm confused.
Pasted text is in (evt.operation as PasteOperation).textScrap
. So you can extract text from textScrap.textFlow
.
精彩评论