Tutorial Saving contenteditable Content Changes as JSON with Ajax

Elements with the contenteditable attribute can be live-edited right in the browser window. But of course those changes don't affect the...

Elements with the contenteditable attribute can be live-edited right in the browser window. But of course those changes don't affect the actual document on your server, so those changes don't persist with a page refresh.
One way to save the data would be to wait for the return key to be pressed, which triggers then sends the new innerHTML of the element as an Ajax call and blurs the element.

Hot in Week

Popular

Archive

item