From a69d24ee6652ea2a644c5efe193f5d3ec8014a68 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 30 Sep 2019 17:22:18 +0200 Subject: [PATCH] * Api: Enable d-n-d into HtmlArea --- api/js/etemplate/et2_widget_htmlarea.js | 5 ++++- mail/js/app.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_htmlarea.js b/api/js/etemplate/et2_widget_htmlarea.js index 565abee236..69fae74f5d 100644 --- a/api/js/etemplate/et2_widget_htmlarea.js +++ b/api/js/etemplate/et2_widget_htmlarea.js @@ -149,7 +149,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([ language: et2_htmlarea.LANGUAGE_CODE[egw.preference('lang', 'common')], language_url: egw.webserverUrl+'/api/js/tinymce/langs/'+et2_htmlarea.LANGUAGE_CODE[egw.preference('lang', 'common')]+'.js', paste_data_images: true, - paste_filter_drop: false, + paste_filter_drop: true, browser_spellcheck: true, contextmenu: false, images_upload_url: imageUpload, @@ -199,6 +199,9 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([ if (self.editor && self.editor.editorContainer) { jQuery(self.editor.editorContainer).height(self.options.height); + jQuery(self.editor.iframeElement.contentWindow.document).on('dragenter', function(){ + if (jQuery('#dragover-tinymce').length < 1) jQuery("").appendTo('head'); + }); } }); }, diff --git a/mail/js/app.js b/mail/js/app.js index d4e288181f..064db08e3b 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -268,7 +268,7 @@ app.classes.mail = AppJS.extend( textAreaWidget.tinymce.then(()=>{ that.compose_resizeHandler(); jQuery(textAreaWidget.editor.iframeElement.contentWindow.document).on('dragenter', function(){ - jQuery('#mail-compose').addClass('dragover'); + // anything to bind on tinymce iframe }); }); }