| 
66 | 66 |                     {% endfor %}  | 
67 | 67 | 
  | 
68 | 68 |                     events: {  | 
69 |  | -                        'image.error': function ( error ) {  | 
70 |  | -                            froalaDisplayError(  this, error );  | 
 | 69 | +                        'image.error': function (error, response) {  | 
 | 70 | +                            if (typeof froalaImageErrorEventHandler === 'function') {  | 
 | 71 | +                                froalaImageErrorEventHandler(this, error, response);  | 
 | 72 | +                            } else {  | 
 | 73 | +                                froalaDisplayError(this, error, response);  | 
 | 74 | +                            }  | 
71 | 75 |                         },  | 
72 |  | -                        'imageManager.error': function ( error ) {  | 
73 |  | -                            froalaDisplayError(  this, error );  | 
 | 76 | +                        'imageManager.error': function (error, response) {  | 
 | 77 | +                            if (typeof froalaImageManagerErrorEventHandler === 'function') {  | 
 | 78 | +                                froalaImageManagerErrorEventHandler(this, error, response);  | 
 | 79 | +                            } else {  | 
 | 80 | +                                froalaDisplayError(this, error, response);  | 
 | 81 | +                            }  | 
74 | 82 |                         },  | 
75 |  | -                        'save.error': function ( error ) {  | 
76 |  | -                            froalaDisplayError(  this, error );  | 
 | 83 | +                        'save.error': function (error, response) {  | 
 | 84 | +                            if (typeof froalaSaveErrorEventHandler === 'function') {  | 
 | 85 | +                                froalaSaveErrorEventHandler(this, error, response);  | 
 | 86 | +                            } else {  | 
 | 87 | +                                froalaDisplayError(this, error, response);  | 
 | 88 | +                            }  | 
77 | 89 |                         },  | 
78 |  | -                        'file.error': function ( error, responses ) {  | 
79 |  | -                            froalaDisplayError(  this, error );  | 
 | 90 | +                        'file.error': function (error, response) {  | 
 | 91 | +                            if (typeof froalaFileErrorEventHandler === 'function') {  | 
 | 92 | +                                froalaFileErrorEventHandler(this, error, response);  | 
 | 93 | +                            } else {  | 
 | 94 | +                                froalaDisplayError(this, error, response);  | 
 | 95 | +                            }  | 
80 | 96 |                         },  | 
81 |  | -                        'video.error': function ( error, responses ) {  | 
82 |  | -                            froalaDisplayError(  this, error );  | 
 | 97 | +                        'video.error': function (error, response) {  | 
 | 98 | +                            if (typeof froalaVideoErrorEventHandler === 'function') {  | 
 | 99 | +                                froalaVideoErrorEventHandler(this, error, response);  | 
 | 100 | +                            } else {  | 
 | 101 | +                                froalaDisplayError(this, error, response);  | 
 | 102 | +                            }  | 
83 | 103 |                         }  | 
84 | 104 |                         {% for event, func in froala_events %}  | 
85 | 105 |                     ,'{{ event }}': {{ func }}  | 
 | 
0 commit comments