UNPKG

summernote-webpack

Version:
23 lines (19 loc) 412 B
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; });