alpaca
Version:
Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide
23 lines (19 loc) • 412 B
JavaScript
define([
'summernote/base/core/dom'
], function (dom) {
/**
* textarea auto sync.
*/
var AutoSync = function (context) {
var $note = context.layoutInfo.note;
this.events = {
'summernote.change': function () {
$note.val(context.invoke('code'));
}
};
this.shouldInitialize = function () {
return dom.isTextarea($note[0]);
};
};
return AutoSync;
});