When we copy some text separated by new line and try to paste it in a text field in IE, the text gets truncated starting from the first new line character. In Firefox and Chrome, the new line character simply converts to a space. I am required to implement a uniform behaviour for all of these browsers.
If I can get hold of the copied text, I can convert all \r\n to \n and then all \n to the space character, but I can't think of a way to access the copied text before its truncated
For IE only!! You can get the information from window.clipboardData as shown here:
The 20 ms timeout is a trick to work around the problem that the clipboard data does not seem to be available at the time jquery kicks off the paste event.