This repository is a mirror of the component module chemzqm/editable. It has been modified to work with NPM+Browserify. You can install it using the command npm install npmcomponent/chemzqm-editable
. Please do not open issues or send pull requests against this repo. If you have issues with this repo, report it to npmcomponent.
Simple and tiny Edit in place for component
With key bindings, esc
for cancel enter
for confirm
Install with component(1):
$ component install chemzqm/editable
var Editable = require('editable');
var node = document.getElementById('test');
var ed = new Editable(node);
ed.on('change', function(v){
console.log(v);
})
-
change
emit with the changed value. -
range error
emit when the value length is not in limited range.
Create Editable instance
min
number, max
number of the value length.
Get current node html.
Reset the value to previous, useful for undo no change
event emitted.
Unregist the events
MIT