Open fhgs2001 opened 7 years ago
You should probably initialize Summernote with a callback that updates your vm property, approximately like so:
Template.editor.viewmodel({
myText: '',
onRendered() {
this.editorElement.summernote({ // $('#myEditorDiv').summernote(...
callbacks: {
onChange: (contents) {
this.myText(contents);
}
}
});
}
});
Hi I would like to ask how can I bind element that is dynamically created using javascript? E.g. I created a textarea using summernote plugin $(element).summernote(). The element textarea does not exist before I created it through an add button.How can I bind the textarea element?