mirror of https://github.com/artf/grapesjs.git
4 changed files with 18 additions and 20 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@ |
|||
/*! grapesjs-aviary - 0.0.3 */ |
|||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["grapesjs-aviary"]=n():e["grapesjs-aviary"]=n()}(this,function(){return function(e){function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,n){"use strict";var t="gjs-aviary";grapesjs.plugins.add(t,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n,r=e.getModel(),a=void 0,i={key:"1",onApply:null,getFilename:null,closeOnApply:!0,config:{}};for(var p in i)p in o||(o[p]=i[p]);var s=o.config;s.apiKey=o.key,s.onSave=function(e,n){a.set("src",n);var t="function"==typeof o.getFilename?o.getFilename:u,r=t(a),i="function"==typeof o.onApply?o.onApply:f;i(n,r,a),o.closeOnApply&&c.close()};var c=new Aviary.Feather(s),l=e.Commands,u=function(e){var n=e.get("src").split("/").pop();return Date.now()+"_"+n.slice(-15)},f=function(n,t){e.AssetManager.add({src:n,name:t})};l.add("image-editor",{run:function(e,n,o){var i=o||{},p=i.model||e.getSelected();a=p,c.launch({image:p.view.el}),r.trigger(t+":launch",p,c)}})})}])}); |
|||
Loading…
Reference in new issue