JSFiddle - React, Tailwind, and code Playground
by VixedS
HTML
<table>
<tbody>
<tr>
<td>1</td>
<td contenteditable='true'>Value1</td>
</tr>
<tr>
<td>2</td>
<td contenteditable='true'>Value2</td>
</tr>
</tbody>
</table>
JavaScript
$('table td').keypress(function(e){
var singleChar=String.fromCharCode(e.keyCode)
console.log("focus ");
console.log(singleChar); // show every carac inputed
});
$('table td').blur(function(){
console.log("blur ");
console.log($(this).text()); // show the new value
});