Detecting with mouse-click highlighted text in textarea

Hi,

Maybe I have more chance with this question.

How can I detect with mouse-click highlighted text and store it as a
string in a file or database. Is this possible with ruby?

Thank you in advance

Bou