@richscripts/richtexteditor 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,7 +165,8 @@ function RTE_Plugin_ImageEditor() {
165
165
  savebtn.innerText = "Saving...";
166
166
 
167
167
  var dataurl = imgeditor.toDataURL();
168
- if (!config.file_upload_handler) {
168
+ var uploadHandler = config.file_upload_handler || window.rte_file_upload_handler;
169
+ if (!uploadHandler) {
169
170
  img.src = dataurl;
170
171
  editor.notifySelectionChange();
171
172
  dialoginner.close();
@@ -174,7 +175,7 @@ function RTE_Plugin_ImageEditor() {
174
175
 
175
176
  var file = dataURLToBlob(dataurl);
176
177
 
177
- config.file_upload_handler(file, function (url, error) {
178
+ uploadHandler(file, function (url, error) {
178
179
  if (url) {
179
180
  img.src = url;
180
181
  editor.notifySelectionChange();