Change <li> into <input> - DOM

Hi there,

Here is the link to my project CodePen.
How can I make my task to be editable by clicking Edit button? I thought about adding input which will be display: none at the beginning. Is it possible with current code or do I have to refactor it?
Thank you,

You could add contenteditable attribute, but because your li contains both buttons you won’t have desired result anyway.

  } else if ( === "editButton") {"contenteditable", "true");
    // alert("clicked edit button");