How to copy the selected text to the Clipboard using firefox?

Asked

Viewed 92 times

0

I need, after selecting a text on any web page, that I copy this text, sending the text to another function, which will make later "post".

The problem is that I need to remove the selection after copying the text, so the "getselection" method, when removing the range, returns empty.

The previous solution was to use execcomand and send to the Clipboard and return the text. But this only works on Chrome, not Firefox which is my current focus. Any suggestions or help?

  • Your problem then is not to copy, but to remove the selection?

  • I rethought and came to the conclusion that yes! A simple mouse click simulation would do, right? Because when doing the post, it no longer matters the selected text because it is all on the server, correct?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.