MaketRandevu/assets/ext/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js
2020-05-12 20:59:29 +02:00

1 line
No EOL
437 B
JavaScript

!function(e){"use strict";e.extend(!0,e.trumbowyg,{plugins:{pasteImage:{init:function(e){e.pasteHandlers.push(function(t){try{for(var a,n=(t.originalEvent||t).clipboardData.items,i=!1,r=n.length-1;r>=0;r-=1)n[r].type.match(/^image\//)&&(a=new FileReader,a.onloadend=function(t){e.execCmd("insertImage",t.target.result,!1,!0)},a.readAsDataURL(n[r].getAsFile()),i=!0);i&&(t.stopPropagation(),t.preventDefault())}catch(o){}})}}}})}(jQuery);