JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>Hello</li>
    <li>World</li>
</ul>

JavaScript

$('li').dblclick(function() {
   this.contentEditable=true
   $(this).on('keypress blur', function(e) {
     if(e.keyCode&&e.keyCode==13||e.type=='blur'){
     this.contentEditable=false
     return false
     }
   });
});