MaketRandevu/assets/ext/trumbowyg/plugins/pasteimage/trumbowyg.pasteimage.min.js

1 line
437 B
JavaScript
Raw Permalink Normal View History

2020-05-12 21:47:37 +03:00
!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);