| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1× 1× 97× 96× 96× 1× 98× 1× | import dom from '../core/dom';
/**
* textarea auto sync.
*/
export default class AutoSync {
constructor(context) {
this.$note = context.layoutInfo.note;
this.events = {
'summernote.change': () => {
this.$note.val(context.invoke('code'));
},
};
}
shouldInitialize() {
return dom.isTextarea(this.$note[0]);
}
}
|