I have a input type text
where the users enter numeric codes separated by ,
or by -
(to make a range). I'd like to allow the user of my site to paste a codes list. I've already managed to bind paste event (with jQuery) and parse the input string removing spaces and everything.
The problem starts when the user codes list is multiline. I haven't found any way to manipulate that text before the browsers attempts to insert it into the input, so the string is truncated at the end of the first line. Is there any way to manipulate the string before the browser truncates it?
Thanks!
Update here there is an example with JSFiddle... Stupid IE, in FF this works great.