diff --git a/templates/CRM/Mosaico/Page/EditorIframe.tpl b/templates/CRM/Mosaico/Page/EditorIframe.tpl index c2bbd7438..aa78b9788 100644 --- a/templates/CRM/Mosaico/Page/EditorIframe.tpl +++ b/templates/CRM/Mosaico/Page/EditorIframe.tpl @@ -24,7 +24,7 @@ var plugins = {/literal}{$mosaicoPlugins}{literal}; var config = {/literal}{$mosaicoConfig}{literal}; - + window.addEventListener('beforeunload', function(e) { if(window.parent.document.getElementById('crm-mosaico').style.display !== "none") { e.preventDefault(); @@ -32,6 +32,9 @@ } }); + if (config.fileuploadConfig.acceptFileTypes) { + config.fileuploadConfig.acceptFileTypes = /(\.|\/)(|gif|p?jpe?g|png|x-png)$/i; + } if (window.top.crmMosaicoIframe) { window.top.crmMosaicoIframe(window, Mosaico, config, plugins); }