title: Using contenteditable in Python
body: <p>I am currently building a todo app using Flask and would like to add the Edit functionality for each item in place, i.e. without opening any new window but edit it right there. I came across the <strong>contenteditable</strong> property, but I  want to know how to extract the edited value from this and send it to a Python function for storing it in the database.</p>
  
  <p>Currently, I have set the property to true as follows:</p>
  
  <pre><code>&lt;span contenteditable="true"&gt; {{ todo.todoitem }} &lt;/span&gt;
  </code></pre>
  
  <p>Double-clicking on it allows me to edit the value, however it does not get saved and reverts to the original value once I am done editing.</p>
  
  <p>I found a similar question here:
  <a href="https://stackoverflow.com/questions/15026599/html-table-with-contenteditable-in-python">HTML table with contenteditable in python</a>, however I am not sure how to use a Jinja2 template to achieve this.</p>
  
  <p>In what way can this be implemented?</p>