Allow edit a value
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
editable-input.js Added HTML type Sep 10, 2014
readme.md Initial commit Sep 10, 2014

readme.md

Editable input

Allow to edit a resource property value in a REST application sending PUT requests

Example:

<h3 data-object="post" data-property="title" data-url="/posts/1">Title here</h3>
new EditableInput(document.querySelector('h3'));

When you edit the value using double click without cancelling you send a request like:

PUT /posts/1
post[title]=New title

If the request is successfull it assumes the value has been saved, and allows cancellation.