I originally tried adding the onpaste event to the TD elements themselves, but this did not work at all. So instead, I added the event to the table element and just check to make sure that the focused element is a TD and then paste the data to that element:.
The paste event is fired when the user has initiated a "paste" action through the browser's user interface.. If the cursor is in an editable context (for example, in a <textarea> or an element with contenteditable attribute set to true) then the default action is to insert the contents of the clipboard into the document at the cursor position..
May 02, 2017 · Invoke the method in the HTMLElementEvents::onpaste event to execute custom paste code. Inserts the data from the system clipboard into the specified location on the document. To invoke this event, do one of the following: Right-click to display the shortcut menu and select Paste. Or press CTRL+V..