How to detect if a user copies text from my webpage?
<p>I am trying to write an online programming quiz app. So, many questions might be like, "What would be the output of the following code ?". </p>

<p>There is a possibility that users might just copy-paste the whole code and try running it in another window. Is there any good way I can prevent this? I know we can disable right click and Ctrl-C, but is there any more elegant way? Even better, is there a way the app can know that the user is trying to copy stuff, and inform the user that it is not allowed? </p>

<p>(Tagging javascript just because I don't know what to tag this as. Please retag to something more meaningful if you if you can think of something)</p>
