Zeus
Zeus

Reputation: 6566

Adobe flex copy paste htmlText into a text area

I've a textArea1, i'm copying htmlText from a different textArea2 to the current text area, it bring the formatting of the textArea2, that is ok, when I clear the textArea1 text, when I start typing, i still get the same format of the textArea2, how do i know what was pasted into the textArea? I've tried paste event, it did not trigger any thing.

What i'm trying to acheive is, try to find out what was pasted here, if the style of the text that is pasted is different, then try to update the styles to the original. How to achieve this?

Thanks.

Upvotes: 0

Views: 425

Answers (2)

Zeus
Zeus

Reputation: 6566

I had to reset the htmlText property of the control. This has done the trick. Thanks.

Upvotes: 1

codingbuddha
codingbuddha

Reputation: 707

IF you want to check the current style of the textfield you could simply use

textfield.getTextFormat()

and then compare it to your initial one. And if you want to check on paste, try using the Event.CHANGE event.

Upvotes: 0

Related Questions