Home

Awesome

Editable Component

Simple and tiny Edit in place for component.

Features

Demo

Check out the demo to see it in action.

Installation

$ npm install editable

$ bower install editable

$ component install pazguille/editable

Usage

<div id="example">Everything contained within this div is editable.</div>
// Creates a new editable component
var Editable = require('editable');
var element = document.getElementById('example');
var edit = new Editable(element, 'Please, edit it!');

// Binds events
edit.on('done', function (content) {
  // Some code here!
  // For example, you can send the content to the server via AJAX,
  // or save into localStorage.
});

edit.on('cancel', function (content) {
  // Some code here!
});

Browser Support

API

Events

With ❤ by

License

MIT license. Copyright © 2015.