function bpFieldInitSummernoteElement(element) {
     var summernoteOptions = element.data('options');

    let summernotCallbacks = {
        onChange: function(contents, $editable) {
            element.val(contents).trigger('change');
        }
    }

    element.on('CrudField:disable', function(e) {
        element.summernote('disable');
    });

    element.on('CrudField:enable', function(e) {
        element.summernote('enable');
    });

    summernoteOptions['callbacks'] = summernotCallbacks;

    element.summernote(summernoteOptions);
}

    