ckeditor4
Version:
JavaScript WYSIWYG web text editor.
15 lines • 7.74 kB
JavaScript
var a0_0x419a='html;attributes;URL;basicWriter;href;refreshInterval;img;open;version;showNotification;writeHtml;src;length;exports;exportPdf;downloadFile;__esModule;commands;error;Authorization;setRequestHeader;application/json;join;documentReady;htmlParser;exportpdf-no-token-url;defineProperty;exportpdf-stylesheets-inaccessible;cssRules;name;call;env;destroy;addEventListener;editable;array;exportPdf_tokenUrl;setInterval;\x3cdiv class\x3d"cke_editable cke_contents_;update;exportPdf_options;send;forEach;addCommand;exportPdf_fileName;remove;plugins;responseType;revokeObjectURL;warn;processingDocument;x-cs-app-id;config;init;exportpdf;push;object;navigator;token;\x3c/div\x3e;data;exportPdf_stylesheets;document,30;cssText;warning;string;map;default;tools;styleSheets;lang;toStringTag;loadend;hasOwnProperty;exportPdfTokenInterval;exportPdf_service;createElement;parse;toolbar;exportPdf_appId;msSaveBlob;document;bind;Content-type;message;isSupportedEnvironment;response;createObjectURL;readAsText;Module;prototype;once;NODE_ELEMENT;isInline;result;ckeditor4-export-pdf.pdf;https://pdf-converter.cke-cs.com/v1/convert;responseText;getAttribute;addButton;fetchToken;stringify;hide;clearInterval;click;getHtml'.split(";");
(function(d,c){for(var a=++c;--a;)d.push(d.shift())})(a0_0x419a,219);var a0_0x998a=function(d,c){return a0_0x419a[d-0]};
(function(d){function c(e){if(a[e])return a[e][a0_0x998a("0x6")];var b=a[e]={i:e,l:!1,exports:{}};d[e][a0_0x998a("0x17")](b[a0_0x998a("0x6")],b,b[a0_0x998a("0x6")],c);b.l=!0;return b[a0_0x998a("0x6")]}var a={};c.m=d;c.c=a;c.d=function(e,a,g){if(!c.o(e,a))Object[a0_0x998a("0x13")](e,a,{enumerable:!0,get:g})};c.r=function(a){if("undefined"!==typeof Symbol&&Symbol.toStringTag)Object[a0_0x998a("0x13")](a,Symbol[a0_0x998a("0x40")],{value:a0_0x998a("0x52")});Object.defineProperty(a,a0_0x998a("0x9"),{value:!0})};
c.t=function(a,b){b&1&&(a=c(a));if(b&8||b&4&&typeof a===a0_0x998a("0x31")&&a&&a[a0_0x998a("0x9")])return a;var g=Object.create(null);c.r(g);Object[a0_0x998a("0x13")](g,"default",{enumerable:!0,value:a});if(b&2&&typeof a!=a0_0x998a("0x3a"))for(var d in a)c.d(g,d,function(b){return a[b]}[a0_0x998a("0x4b")](null,d));return g};c.n=function(a){var b=a&&a[a0_0x998a("0x9")]?function(){return a[a0_0x998a("0x3c")]}:function(){return a};c.d(b,"a",b);return b};c.o=function(a,b){return Object[a0_0x998a("0x53")][a0_0x998a("0x42")].call(a,
b)};c.p="";return c(c.s=0)})([function(d,c,a){d[a0_0x998a("0x6")]=a(1)},function(d,c){(function(){CKEDITOR[a0_0x998a("0x27")].add(a0_0x998a("0x2f"),{lang:"en",icons:a0_0x998a("0x2f"),hidpi:!0,isSupportedEnvironment:function(){return!CKEDITOR.env.ie||10<CKEDITOR[a0_0x998a("0x18")][a0_0x998a("0x1")]},beforeInit:function(a){var c=a[a0_0x998a("0x2d")][a0_0x998a("0x1d")],b=this.createTokenFetcher(a,c);b[a0_0x998a("0x2e")]();a.on(a0_0x998a("0x7"),function(a){a.data[a0_0x998a("0x33")]=b.token},null,null,
16)},init:function(a){function c(){return a.plugins.notification?a[a0_0x998a("0x2")].apply(a,arguments):{update:function(){},hide:function(){}}}function b(f){if(!a[a0_0x998a("0x2d")][a0_0x998a("0x36")][a0_0x998a("0x5")]&&!a.editable()[a0_0x998a("0x56")]()){var b=[];f=f.$[a0_0x998a("0x3e")];try{CKEDITOR.tools[a0_0x998a("0x1c")].forEach(f,function(a){CKEDITOR.tools[a0_0x998a("0x1c")].forEach(a[a0_0x998a("0x15")],function(a){b[a0_0x998a("0x30")](a[a0_0x998a("0x38")])})})}catch(c){CKEDITOR[a0_0x998a("0x2a")](a0_0x998a("0x14"),
{error:c[a0_0x998a("0x4d")]})}return b[a0_0x998a("0xf")]("")}}function g(a){var b=new (CKEDITOR[a0_0x998a("0x11")][a0_0x998a("0x66")]);a=CKEDITOR[a0_0x998a("0x11")].fragment.fromHtml(a);a[a0_0x998a("0x23")](function(a){a[a0_0x998a("0x16")]===a0_0x998a("0x69")&&(a[a0_0x998a("0x64")].src=l(a[a0_0x998a("0x64")][a0_0x998a("0x4")]))},CKEDITOR[a0_0x998a("0x55")],!1);a[a0_0x998a("0x3")](b);return b[a0_0x998a("0x62")]()}function d(b,c){b.addEventListener("progress",function(){c.update({progress:.8})});b.addEventListener("loadend",
function(){"200"==b.status?(CKEDITOR[a0_0x998a("0x27")][a0_0x998a("0x2f")][a0_0x998a("0x8")](h(),b[a0_0x998a("0x4f")]),c[a0_0x998a("0x20")]({message:a[a0_0x998a("0x3f")][a0_0x998a("0x2f")][a0_0x998a("0x10")],type:"success",duration:3E3,progress:1})):(m(b[a0_0x998a("0x4f")]),c[a0_0x998a("0x5f")](),a[a0_0x998a("0x2")](a.lang[a0_0x998a("0x2f")][a0_0x998a("0xb")],a0_0x998a("0x39")));a[a0_0x998a("0xa")][a0_0x998a("0x7")].enable()})}function h(){var b=a[a0_0x998a("0x2d")][a0_0x998a("0x25")];return"function"===
typeof b?b():b}function m(a){if(a){var b=new FileReader;b.addEventListener("loadend",function(a){a=JSON[a0_0x998a("0x46")](a.srcElement[a0_0x998a("0x57")]);console[a0_0x998a("0xb")](a)});b[a0_0x998a("0x51")](a)}}function l(b){var c=a.document.createElement("a");c.$[a0_0x998a("0x67")]=b;return c.$.href}if(this[a0_0x998a("0x4e")]()&&(a[a0_0x998a("0x24")]("exportPdf",{exec:function(f){var k=c(f[a0_0x998a("0x3f")][a0_0x998a("0x2f")][a0_0x998a("0x2b")],"progress",0),h={html:f.getData(),css:b(f[a0_0x998a("0x4a")]),
options:f[a0_0x998a("0x2d")].exportPdf_options};this.disable();f.once(a0_0x998a("0x7"),function(b){k[a0_0x998a("0x20")]({progress:.2});b[a0_0x998a("0x35")].html=g(b.data[a0_0x998a("0x63")]);var c=b.data;b=b[a0_0x998a("0x35")][a0_0x998a("0x63")];var d=f[a0_0x998a("0x1b")]().getDirection(!0);b=(a[a0_0x998a("0x2d")][a0_0x998a("0x36")][a0_0x998a("0x5")]?CKEDITOR[a0_0x998a("0x3d")].buildStyleHtml(CKEDITOR[a0_0x998a("0x3d")].array[a0_0x998a("0x3b")](a[a0_0x998a("0x2d")].exportPdf_stylesheets,l)):"")+a0_0x998a("0x1f")+
d+'"\x3e'+b+a0_0x998a("0x34");c.html=b},null,null,15);f[a0_0x998a("0x54")]("exportPdf",function(b){var c=b[a0_0x998a("0x35")][a0_0x998a("0x33")];delete b.data[a0_0x998a("0x33")];var g=f[a0_0x998a("0x2d")][a0_0x998a("0x44")];b=JSON[a0_0x998a("0x5e")](b[a0_0x998a("0x35")]);var e=new XMLHttpRequest,h=a[a0_0x998a("0x2d")][a0_0x998a("0x48")]||"cke4";e[a0_0x998a("0x0")]("POST",g);e.setRequestHeader(a0_0x998a("0x4c"),a0_0x998a("0xe"));e.setRequestHeader(a0_0x998a("0x2c"),h);if(c)e[a0_0x998a("0xd")](a0_0x998a("0xc"),
c);else CKEDITOR[a0_0x998a("0x2a")]("exportpdf-no-token");e[a0_0x998a("0x28")]="blob";e[a0_0x998a("0x22")](b);k[a0_0x998a("0x20")]({progress:.5});d(e,k)},null,null,20);f.fire(a0_0x998a("0x7"),h)},modes:{wysiwyg:1},readOnly:1,canUndo:!1}),a.ui[a0_0x998a("0x5c")]))a.ui[a0_0x998a("0x5c")]("ExportPdf",{label:a[a0_0x998a("0x3f")][a0_0x998a("0x2f")][a0_0x998a("0x47")],command:a0_0x998a("0x7"),toolbar:a0_0x998a("0x37")})},createTokenFetcher:function(a,c){var b={refreshInterval:a[a0_0x998a("0x43")]||36E5,
fetchToken:function(){var a=new XMLHttpRequest;a[a0_0x998a("0x0")]("GET",c);a[a0_0x998a("0x1a")](a0_0x998a("0x41"),function(){a[a0_0x998a("0x5a")]&&(b.token=a[a0_0x998a("0x5a")])});a[a0_0x998a("0x22")]()},init:function(){if(c){this[a0_0x998a("0x5d")]();var b=window[a0_0x998a("0x1e")](this[a0_0x998a("0x5d")],this[a0_0x998a("0x68")]);a[a0_0x998a("0x54")](a0_0x998a("0x19"),function(){window[a0_0x998a("0x60")](b)})}else CKEDITOR.warn(a0_0x998a("0x12"))}};return b}});CKEDITOR[a0_0x998a("0x27")][a0_0x998a("0x2f")]=
{downloadFile:function(a,c){if(CKEDITOR[a0_0x998a("0x18")].ie){var b=new Blob([c],{type:"application/octet-stream"});window[a0_0x998a("0x32")][a0_0x998a("0x49")](b,a)}else b=CKEDITOR[a0_0x998a("0x4a")][a0_0x998a("0x45")]("a",{attributes:{href:window[a0_0x998a("0x65")][a0_0x998a("0x50")](c),download:a}}),b.$[a0_0x998a("0x61")](),b[a0_0x998a("0x26")](),window[a0_0x998a("0x65")][a0_0x998a("0x29")](b[a0_0x998a("0x5b")](a0_0x998a("0x67")))}}})();CKEDITOR.config.exportPdf_service=a0_0x998a("0x59");CKEDITOR.config[a0_0x998a("0x1d")]=
"";CKEDITOR[a0_0x998a("0x2d")][a0_0x998a("0x25")]=a0_0x998a("0x58");CKEDITOR[a0_0x998a("0x2d")][a0_0x998a("0x36")]=[];CKEDITOR[a0_0x998a("0x2d")][a0_0x998a("0x21")]={}}]);