芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/vendor/ckeditor/ckeditor/plugins/preview/plugin.js
/* Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ (function(){function h(b,f){var e=CKEDITOR.plugins.getPath("preview"),a=b.config,c=b.title,d;d=a.baseHref?'\x3cbase href\x3d"'+a.baseHref+'"\x3e':"";if(a.fullPage)e=b.getData().replace(//,"$\x26"+d).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+c);else{e=a.docType+'\x3chtml dir\x3d"'+a.contentsLangDirection+'"\x3e\x3chead\x3e'+d+"\x3ctitle\x3e"+c+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(a.contentsCss)+'\x3clink rel\x3d"stylesheet" media\x3d"screen" href\x3d"'+e+'styles/screen.css"\x3e\x3c/head\x3e'; a="\x3cbody\x3e";if(c=b.document&&b.document.getBody())c.getAttribute("id")&&(a=a.replace("\x3e",' id\x3d"'+c.getAttribute("id")+'"\x3e')),c.getAttribute("class")&&(a=a.replace("\x3e",' class\x3d"'+c.getAttribute("class")+'"\x3e'));e=e+a+b.getData()+(f?"\x3cscript\x3e"+(CKEDITOR.env.ie?"window.onload":"document.onreadystatechange")+" \x3d function() { previewCallback(); } \x3c/script\x3e":"")+"\x3c/body\x3e\x3c/html\x3e"}return e}function k(){var b=window.screen;return{width:Math.round(.8*b.width), height:Math.round(.7*b.height),left:Math.round(.1*b.width)}}CKEDITOR.plugins.add("preview",{lang:"af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn",icons:"preview,preview-rtl",hidpi:!0,init:function(b){b.addCommand("preview",{modes:{wysiwyg:1},canUndo:!1,readOnly:1,exec:function(){CKEDITOR.plugins.preview.createPreview(b)}}); b.ui.addButton&&b.ui.addButton("Preview",{label:b.lang.preview.preview,command:"preview",toolbar:"document,40"})}});CKEDITOR.plugins.preview={createPreview:function(b,f){var e={dataValue:h(b,f)},a=k(),c;c=CKEDITOR.env.ie?"javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )":null;var d,g;if(!1=== b.fire("contentPreview",e))return!1;c&&(window._cke_htmlToLoad=e.dataValue);d=window.open("",null,["toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes","width\x3d"+a.width,"height\x3d"+a.height,"left\x3d"+a.left].join());g=new CKEDITOR.dom.window(d);c&&d&&(d.location=c);window._cke_htmlToLoad||(a=d.document,a.open(),a.write(e.dataValue),a.close());f&&(d.previewCallback=function(){"complete"===d.document.readyState&&f(g)},d.previewCallback());return g}}})();