I am looking to create a functionality where I can toggle between a h4 element and a text input element by double clicking on the h4 element.
Once I have finished typing in the input field and press Enter, I want it to switch back to the h4 element.
This feature will be implemented in VueJs using a loop to display all the comments.
Currently, my code looks like this:
<h4 @dblclick="editComment(text)">{{text}}</h4>
editComment(item){
item = 'New Comment'
};