agenda-libre-ruby/public/assets/tinymce/plugins/preview/plugin-41472eb0321860529e83e84e54a86f32c5c0858a16c8e7738b838e31266447bc.js

2 lines
3.3 KiB
JavaScript
Raw Normal View History

2018-01-01 17:52:33 +01:00
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("6",["4"],function(a){return a("tinymce.Env")}),g("7",["4"],function(a){return a("tinymce.util.Tools")}),g("8",[],function(){var a=function(a){return parseInt(a.getParam("plugin_preview_width","650"),10)},b=function(a){return parseInt(a.getParam("plugin_preview_height","500"),10)},c=function(a){return a.getParam("content_style","")};return{getPreviewDialogWidth:a,getPreviewDialogHeight:b,getContentStyle:c}}),g("9",["7","8"],function(a,b){var c=function(c){var d,e="",f=c.dom.encode,g=b.getContentStyle(c);e+='<base href="'+f(c.documentBaseURI.getURI())+'">',g&&(e+='<style type="text/css">'+g+"</style>"),a.each(c.contentCSS,function(a){e+='<link type="text/css" rel="stylesheet" href="'+f(c.documentBaseURI.toAbsolute(a))+'">'});var h=c.settings.body_id||"tinymce";h.indexOf("=")!==-1&&(h=c.getParam("body_id","","hash"),h=h[c.id]||h);var i=c.settings.body_class||"";i.indexOf("=")!==-1&&(i=c.getParam("body_class","","hash"),i=i[c.id]||"");var j='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);</script> ',k=c.settings.directionality?' dir="'+c.settings.directionality+'"':"";return d="<!DOCTYPE html><html><head>"+e+'</head><body id="'+f(h)+'" class="mce-content-body '+f(i)+'"'+f(k)+">"+c.getContent()+j+"</body></html>"},d=function(a,b,d){var e=c(a);if(d)b.src="data:text/html;charset=utf-8,"+encodeURIComponent(e);else{var f=b.contentWindow.document;f.open(),f.write(e),f.close()}};return{getPreviewHtml:c,injectIframeContent:d}}),g("5",["6","7","8","9"],function(a,b,c,d){var e=function(b){var e=!a.ie,f='<iframe src="javascript:\'\'" frameborder="0"'+(e?' sandbox="allow-scripts"':"")+"></iframe>",g=c.getPreviewDialogWidth(b),h=c.getPreviewDialogHeight(b);b.windowManager.open({title:"Preview",width:g,height:h,html:f,buttons:{text:"Close",onclick:function(a){a.control.parent().parent().close()}},onPostRender:function(a){var c=a.control.getEl("body").firstChild;d.injectIframeContent(b,c,e)}})};return{open:e}}),g("2",["5"],function(a){var b=function(b){b.addCommand("mcePreview",function(){a.open(b)})};return{register:b}}),g("3",[],function(){var a=function(a){a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})};return{register:a}}),g("0",["1","2","3"],function(a,b,c){return a.add("preview",function(a){b.register(a),c.register(a)}),function(){}}),d("0")()}();