开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜