The x-editable in-place editor with Twitter Bootstrap, repackaged for Meteor.
mrt add x-editable-bootstrap-less
NOTE: The latest branch uses the Bootstrap 3 build of x-editable. If you are still using Bootstrap 2, install v1.4.6.3 instead of the latest.
<p id="textArea" class="editable" data-type="textarea" data-placeholder="Enter text" data-emptytext="Click to enter text" data-rows="4">{{textAreaContent}}</p>
The short answer:
$('#textArea.editable').editable({
success: function(response, newValue) {
<do something with newValue - usually a collection.update call>
}});
The long answer: trying to use x-editable properly on Meteor 0.8 with reactive updates can get interesting. If there is a lot of concurrency in your editing, you will want to consult the information and links in this StackOverflow post.
- Updated to use BS3 build of x-editable 1.5.1.
- Added example and updated readme to reflect operation under meteor 0.8.0+ (syntax is more simple with blaze)