I am sending sensitive information to my users that I would like them to be able to copy (for pasting elsewhere) but not see directly.
There are a few approaches I have considered, and I am stuck on all of them.
Populate an password box with the data, but this doesn't allow them to copy the text.
Make the text color the same as the background color. However, I am afraid that my users will not even know that there is text to copy. They will just sit there and go "I don't see a any text!" Even if I do point out very explicitly what they are supposed to do, then the text will still be visible when it is selected.
Create some kind of on_copy event that will pass the text when a user copies the asterisks. I know how to use jQuery's bind() to detect a copy, but I have not found a way to change what actually gets copied.
Last and least: Something fancy with javascript and clipboard management. I really don't want to go there as it would require flash.