You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tinymce.PluginManager.add("base64_image_insert",function(e,t){function n(){_dialog=e.windowManager.open({title:"Insert Image",onSubmit:function(t){t.getData().dropzone[0].size>1048576&&alert("Your image have more then 1MB, consider using this image. (It's too big)");const n=new FileReader;n.onload=function(n){const o=n.target.result;(new Image).src=o,e.insertContent("<img src='"+o+"' height='200px'/>"),t.close()},n.onerror=function(e){alert("Error reading file - "+e.getMessage())},n.readAsDataURL(t.getData().dropzone[0])},body:{type:"panel",items:[{type:"dropzone",name:"dropzone",label:"Dropzone"}]},buttons:[{text:"Close",type:"cancel",onclick:"close"},{text:"Insert",type:"submit",primary:!0}]})}e.ui.registry.addButton("base64_image_insert",{text:"",tooltip:"Insert embedded image",onAction:n,icon:"image"}),e.ui.registry.addMenuItem("base64_image_insert",{text:"",context:"insert",icon:"image",onAction:n})});