Not sure this is gonna be the best answer but for the editing part maybe
HTML5's
contentEditable
is what your looking for.
for storing value in the DOM or rather store data associated with a
given HTML element , maybe you should have a look at Jquery
data() .