I need to check if a unicode is stuck and remove it from the string ...
//Trae el array.
$scope.pasteTitle = function (e){
var stringUnicode = e.originalEvent.clipboardData.getData('text/plain');
console.log(stringUnicode);
}
$scope.pasteTitle = function (e){
var clipboardData, pastedData;
// Stop data actually being pasted into div
e.stopPropagation();
e.preventDefault();
// Get pasted data via clipboard API
pastedData = e.originalEvent.clipboardData.getData('text/plain');
// Do whatever with pasteddata
$scope.sanitizeUnicode(pastedData);
}
var pastedData =[1];
function PastedArray(element) {
var n = pastedData.charCodeAt(e);
if(n <255){
replace('');//replace unicode character.
console.log("UNICODE DETECTADO");
}else{
console.log("todo en orden");
};
}
pastedData.forEach(PastedArray);