How do I save the info input by the user into a contenteditable cell in a mongoDB database?

Hi all, the user sees a table like this on his browser:

If he clicks on any cell, that cell is circled with a black border signifying that you are allowed to type in it, as shown in the image above. You can type anything you want, including emojis. I achieved this using contenteditable="true" inside the td tag:
<td class="bordered editable_cell" contenteditable="true"></td>

Once the user is done filling the cells with whatever he likes he leaves the page (maybe to go to another page or to turn off his laptop). I want to be able to save what he wrote in a mongoDB database, so that when he returns, what he wrote is still there and he can continue filling in the table.

So how does one send the input of a contenteditable cell and save it in one’s database? I’ve done FCC projects that save input data before, but not from a content editable cell, and especially not from many contenteditable cells.

Also, I don’t want the user to have to register or sign in. So I was thinking the way to avoid this but still be able to save his input data would be to identify the user by his ip address as he visits the page. What do you think?

Thanks for your time


P.S. Can all this be done just using cookies instead of a database? Or is my understanding of cookies completely wrong?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.