I found a workaround:
function fixCopyPaste(el) { el.bind('paste', function(e) { var element = $(this).context; var text = $(this).val(); var start = element.selectionStart; var pastedText = e.originalEvent.clipboardData.getData('text/plain'); $(this).val(text.substring(0, element.selectionStart) +pastedText +text.substring(element.selectionEnd, text.length)); element.selectionStart = start+pastedText.length; element.selectionEnd = element.selectionStart; }); }
Call this function on the input element that you want to enable. For instance:.
fixCopyPaste($('#notes'));
Perhaps it can be expanded to handle multiple items.
source share