I use this code for now :
for (var i = 0; i < all_local_cell.length; i++) {
var td = all_local_cell[I]; //number of textfield cells
td.onpaste = function (e) {
var target = e.srcElement;
var Max_Length = 8;
var length = this.value.length;
if (length > Max_Length) {
// ???
};
I try to check when user paste a text, if this text is > max length keep the <= length and put the extra text on next lines...
e.g. user try to paste online 0 : "indent code by 4 spaces"
0.indent c
1.ode by 4
2. spaces