summernote-webpack
Version:
Super simple WYSIWYG editor
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;
});