title: limit how many characters can be pasted in textarea
body: <p>Is it possible to detect how many characters are being pasted into a HTML textarea, and cancel the paste if beyond a limit?</p>
  
  <p>Edit: what I am trying to do is prevent the user pasting a massive amount of characters (~3 million) because it crashes some browsers. So I want to cancel the paste before their browser locks up. I am making a document editor where users are likely to try this. But they can type as much as they want.</p>