summaryrefslogtreecommitdiff
path: root/program/js/tinymce/plugins/preview/plugin.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tinymce/plugins/preview/plugin.min.js')
-rw-r--r--program/js/tinymce/plugins/preview/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/program/js/tinymce/plugins/preview/plugin.min.js b/program/js/tinymce/plugins/preview/plugin.min.js
new file mode 100644
index 000000000..23e70acb1
--- /dev/null
+++ b/program/js/tinymce/plugins/preview/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("preview",function(e){var t=e.settings,i=!tinymce.Env.ie;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"'+(i?' sandbox="allow-scripts"':"")+"></iframe>",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var n,a="";a+='<base href="'+e.documentBaseURI.getURI()+'">',tinymce.each(e.contentCSS,function(t){a+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var r=t.body_id||"tinymce";-1!=r.indexOf("=")&&(r=e.getParam("body_id","","hash"),r=r[e.id]||r);var d=t.body_class||"";-1!=d.indexOf("=")&&(d=e.getParam("body_class","","hash"),d=d[e.id]||"");var o=e.settings.directionality?' dir="'+e.settings.directionality+'"':"";if(n="<!DOCTYPE html><html><head>"+a+'</head><body id="'+r+'" class="mce-content-body '+d+'"'+o+">"+e.getContent()+"</body></html>",i)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(n);else{var s=this.getEl("body").firstChild.contentWindow.document;s.open(),s.write(n),s.close()}}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); \ No newline at end of file