Say in implementation the jeditable textile you don’t want any OK nor Cancel buttons, kinda like making your textarea an Excel cell, how to do that?
The key is to use onblur, then comment out submit and cancel. Now when you press ESC, it’s a cancel. Clicking somewhere else is an OK, or submit.
$('.editable_textile').editable('save.php', { indicator : '', loadurl : 'load.php', type : 'textarea', onblur : 'submit', //submit : 'OK', //cancel : 'Cancel', callback: function(value, settings) { var retval = value.replace(/\n/gi, "
\n"); $(this).html(retval); }, });
See more examples at http://unrealideas.net/examples/05_onblur.php