function saveButtonClicked(event) {
        var id = $(event.target).data('uuid');
        console.log('Fetching save button : %s', id);
        db.get(id).then(function(doc){
            doc.notes = editor.exportFile();
            db.put(doc).catch(function(err){
                console.log('Failed to update on clicking save button');

            });
        }).catch(function(err){
            console.log('Failed to get on clicking save button clicked.')
        })
    }
// User has clicked on the save button
User has clicked on the save button
User has clicked on the save button
function saveButtonClicked(event) {
        var id = $(event.target).data('uuid');
        console.log('Fetching save button : %s', id);
        db.get(id).then(function(doc){
            doc.notes = editor.exportFile();
            db.put(doc).catch(function(err){
                console.log('Failed to update on clicking save button');
            });
        }).catch(function(err){
            console.log('Failed to get on clicking save button clicked.')
        })
    }
function saveButtonClicked ( event ) { var id = $ ( event . target ) . data ( 'uuid' ) ; console . log ( 'Fetching save button : %s' , id ) ; db . get ( id ) . then ( function ( doc ) { doc . notes = editor . exportFile ( ) ; db . put ( doc ) . catch ( function ( err ) { console . log ( 'Failed to update on clicking save button' ) ; } ) ; } ) . catch ( function ( err ) { console . log ( 'Failed to get on clicking save button clicked.' ) } ) }
User has clicked on the save button
User has clicked on the save button