mpowaga / meteor-autoform-summernote

https://atmospherejs.com/mpowaga/autoform-summernote
25 stars 18 forks source link

autosave isn't working #3

Closed rantav closed 9 years ago

rantav commented 9 years ago

autoForm has the autosave option, which does not seem to work with summernote in this repo. Is there a way to achieve it?

With other text fields in autoform, an autosave means saving upon a blur event.

jeanfredrik commented 9 years ago

This bug seems to be back/not completely solved. Try this meteorpad: http://meteorpad.com/pad/xB3M5sprTG2PiRuKa

It's using Autoform 5. The form submits whenever the title field is blurred, but for the body field the form submits on blur only if it's the first submit. In other words: After the first submit, the autosave stops working on the body field, but continues to work on the title field.

mvgalle commented 8 years ago

Had a similar problem. Solved it with by adding the following to my Template onRendered

Template.whateveryourtemplatenameis.onRendered(function () {
$('.editor').on('summernote.change', function(we, contents, $editable) {
        console.log('summernote content has changed.');
        console.log(contents);
        Meteor.call('updateFieldA', Router.current().params._id, contents);
    });
});