@ckeditor/ckeditor5-export-pdf 29.2.0 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -2
- package/README.md +2 -2
- package/package.json +27 -27
- package/src/exportpdf.js +2 -2
- package/src/exportpdfcommand.js +2 -2
- package/src/index.js +2 -2
- package/src/utils.js +2 -2
- package/theme/exportpdf.css +1 -1
- package/CHANGELOG.md +0 -4
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 export to PDF feature** (https://ckeditor.com/ckeditor-5/)<br>
|
|
5
|
-
Copyright (c) 2003-
|
|
5
|
+
Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
|
|
6
6
|
|
|
7
7
|
CKEditor 5 export to PDF feature is licensed under a commercial license and is protected by copyright law.
|
|
8
8
|
For more details about available licensing options please contact us at sales@cksource.com.
|
|
@@ -15,4 +15,4 @@ Where not otherwise indicated, all CKEditor 5 export to PDF feature content is a
|
|
|
15
15
|
Trademarks
|
|
16
16
|
----------
|
|
17
17
|
|
|
18
|
-
**CKEditor** is a trademark of [CKSource](http://cksource.com)
|
|
18
|
+
**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
package/README.md
CHANGED
|
@@ -28,11 +28,11 @@ As a licensed CKEditor 5 export to PDF feature user you can report bugs and requ
|
|
|
28
28
|
## License
|
|
29
29
|
|
|
30
30
|
**CKEditor 5 export to PDF** (https://ckeditor.com/ckeditor-5/)<br>
|
|
31
|
-
Copyright (c) 2003-
|
|
31
|
+
Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. All rights reserved.
|
|
32
32
|
|
|
33
33
|
CKEditor 5 export to PDF feature is licensed under a commercial license and is protected by copyright law.
|
|
34
34
|
For more details about available licensing options please contact us at sales@cksource.com.
|
|
35
35
|
|
|
36
36
|
### Trademarks
|
|
37
37
|
|
|
38
|
-
**CKEditor** is a trademark of [CKSource](http://cksource.com)
|
|
38
|
+
**CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-export-pdf",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "Export to PDF feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -29,36 +29,36 @@
|
|
|
29
29
|
],
|
|
30
30
|
"main": "src/index.js",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"ckeditor5": "
|
|
32
|
+
"ckeditor5": "^32.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@ckeditor/ckeditor5-alignment": "
|
|
36
|
-
"@ckeditor/ckeditor5-basic-styles": "
|
|
37
|
-
"@ckeditor/ckeditor5-cloud-services": "
|
|
38
|
-
"@ckeditor/ckeditor5-code-block": "
|
|
39
|
-
"@ckeditor/ckeditor5-core": "
|
|
40
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
41
|
-
"@ckeditor/ckeditor5-easy-image": "
|
|
42
|
-
"@ckeditor/ckeditor5-editor-decoupled": "
|
|
43
|
-
"@ckeditor/ckeditor5-font": "
|
|
44
|
-
"@ckeditor/ckeditor5-heading": "
|
|
45
|
-
"@ckeditor/ckeditor5-highlight": "
|
|
46
|
-
"@ckeditor/ckeditor5-horizontal-line": "
|
|
47
|
-
"@ckeditor/ckeditor5-image": "
|
|
48
|
-
"@ckeditor/ckeditor5-indent": "
|
|
49
|
-
"@ckeditor/ckeditor5-media-embed": "
|
|
50
|
-
"@ckeditor/ckeditor5-page-break": "
|
|
51
|
-
"@ckeditor/ckeditor5-paragraph": "
|
|
52
|
-
"@ckeditor/ckeditor5-paste-from-office": "
|
|
53
|
-
"@ckeditor/ckeditor5-table": "
|
|
54
|
-
"@ckeditor/ckeditor5-theme-lark": "
|
|
55
|
-
"@ckeditor/ckeditor5-ui": "
|
|
56
|
-
"@ckeditor/ckeditor5-utils": "
|
|
57
|
-
"webpack": "^
|
|
58
|
-
"webpack-cli": "^
|
|
35
|
+
"@ckeditor/ckeditor5-alignment": "^32.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-basic-styles": "^32.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-cloud-services": "^32.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-code-block": "^32.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-core": "^32.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-dev-utils": "^28.0.1",
|
|
41
|
+
"@ckeditor/ckeditor5-easy-image": "^32.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-editor-decoupled": "^32.0.0",
|
|
43
|
+
"@ckeditor/ckeditor5-font": "^32.0.0",
|
|
44
|
+
"@ckeditor/ckeditor5-heading": "^32.0.0",
|
|
45
|
+
"@ckeditor/ckeditor5-highlight": "^32.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-horizontal-line": "^32.0.0",
|
|
47
|
+
"@ckeditor/ckeditor5-image": "^32.0.0",
|
|
48
|
+
"@ckeditor/ckeditor5-indent": "^32.0.0",
|
|
49
|
+
"@ckeditor/ckeditor5-media-embed": "^32.0.0",
|
|
50
|
+
"@ckeditor/ckeditor5-page-break": "^32.0.0",
|
|
51
|
+
"@ckeditor/ckeditor5-paragraph": "^32.0.0",
|
|
52
|
+
"@ckeditor/ckeditor5-paste-from-office": "^32.0.0",
|
|
53
|
+
"@ckeditor/ckeditor5-table": "^32.0.0",
|
|
54
|
+
"@ckeditor/ckeditor5-theme-lark": "^32.0.0",
|
|
55
|
+
"@ckeditor/ckeditor5-ui": "^32.0.0",
|
|
56
|
+
"@ckeditor/ckeditor5-utils": "^32.0.0",
|
|
57
|
+
"webpack": "^5.58.1",
|
|
58
|
+
"webpack-cli": "^4.9.0"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
61
|
+
"node": ">=14.0.0",
|
|
62
62
|
"npm": ">=5.7.1"
|
|
63
63
|
},
|
|
64
64
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/exportpdf.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x516af7}from'ckeditor5/src/core';import{ButtonView as _0x2d2a2f,View as _0xe0c852,Notification as _0x21864a}from'ckeditor5/src/ui';import _0x168356 from'./exportpdfcommand';import _0x454396 from'../theme/icons/exportpdf.svg';import'../theme/exportpdf.css';export default class p extends _0x516af7{static get['pluginName'](){return'ExportPdf';}static get['requires'](){return['CloudServices',_0x21864a];}['init'](){const _0x57674b=this['editor'],t=_0x57674b['t'],_0x514c10=_0x57674b['config']['get']('exportPdf')||{};_0x57674b['commands']['add']('exportPdf',new _0x168356(_0x57674b)),_0x57674b['ui']['componentFactory']['add']('exportPdf',_0x41af21=>{const _0xea0f44=_0x57674b['commands']['get']('exportPdf'),_0xf73fc6=new _0x2d2a2f(_0x41af21);_0xf73fc6['set']({'label':t('Export\x20to\x20PDF'),'icon':_0x454396,'tooltip':!0x0}),_0xf73fc6['bind']('isOn','isEnabled')['to'](_0xea0f44,'isBusy','isEnabled'),_0xf73fc6['extendTemplate']({'attributes':{'class':[_0xf73fc6['bindTemplate']['if']('isOn','ck-exportpdf_status-pending')]}});const _0x5bdbd6=new _0xe0c852();return _0x5bdbd6['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-exportpdf__spinner-container']},'children':[{'tag':'span','attributes':{'class':['ck','ck-exportpdf__spinner']}}]}),_0xf73fc6['children']['add'](_0x5bdbd6),this['listenTo'](_0xf73fc6,'execute',()=>{_0x57674b['execute']('exportPdf',_0x514c10),_0x57674b['editing']['view']['focus']();}),_0xf73fc6;});const _0x5c7e3c=_0x57674b['plugins']['get']('CloudServices');if(!0x1===_0x514c10['tokenUrl'])this['_token']=null;else{if(_0x514c10['tokenUrl'])return _0x5c7e3c['registerTokenUrl'](_0x514c10['tokenUrl'])['then'](_0x36dfac=>{this['_token']=_0x36dfac;});this['_token']=_0x5c7e3c['token'];}}}
|
package/src/exportpdfcommand.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
23
|
+
import{Command as _0x178911}from'ckeditor5/src/core';import{getStyles as _0x2ffcf6}from'./utils';export default class o extends _0x178911{constructor(_0x6636d1){super(_0x6636d1),this['set']('isBusy',!0x1),this['affectsData']=!0x1;}['refresh'](){this['isEnabled']=!this['isBusy'],this['value']=this['isBusy']?'pending':void 0x0;}['execute'](_0x49c9b5={}){const _0x2a2b91=this['editor'],t=_0x2a2b91['t'],_0x452eb3=_0x49c9b5['converterUrl']||'https://pdf-converter.cke-cs.com/v1/convert/',_0x466add=_0x49c9b5['dataCallback']||(_0x3b971b=>_0x3b971b['getData']()),_0x416145=_0x2a2b91['plugins']['get']('ExportPdf'),_0x443c26=_0x49c9b5['token']||_0x416145['_token'];return this['isBusy']=!0x0,this['refresh'](),_0x2ffcf6(_0x49c9b5['stylesheets']||['EDITOR_STYLES'])['then'](_0x9bedeb=>{const _0x3d38b3={'html':'<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22'+_0x2a2b91['locale']['contentLanguageDirection']+'\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09'+_0x466add(_0x2a2b91)+'\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09</html>','css':_0x9bedeb,'options':_0x49c9b5['converterOptions']},_0x492e4e={'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/pdf',..._0x443c26?{'Authorization':_0x443c26['value']}:null,'x-cs-app-id':_0x49c9b5['appID']||'cke5'},'body':JSON['stringify'](_0x3d38b3)};return window['fetch'](_0x452eb3,_0x492e4e)['then'](_0x238ecf=>{if(0xc8!==_0x238ecf['status'])throw _0x238ecf;return _0x238ecf['blob']();})['then'](_0x4707cc=>{this['o'](_0x4707cc,_0x49c9b5['fileName']||'document.pdf');});})['catch'](_0xad978a=>{throw _0x2a2b91['plugins']['get']('Notification')['showWarning'](t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.')),_0xad978a;})['finally'](()=>{this['isBusy']=!0x1,this['refresh']();});}['o'](_0x28d32e,_0x51b9f0){const _0x3c7182=document['createElement']('a');_0x3c7182['href']=window['URL']['createObjectURL'](_0x28d32e),_0x3c7182['download']=_0x51b9f0,_0x3c7182['click'](),_0x3c7182['remove']();}}
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x4a92=['./exportpdf'];(function(_0x4f4412,_0x4a92ff){var _0x35bf19=function(_0xb92804){while(--_0xb92804){_0x4f4412['push'](_0x4f4412['shift']());}};_0x35bf19(++_0x4a92ff);}(_0x4a92,0x1b1));var _0x35bf=function(_0x4f4412,_0x4a92ff){_0x4f4412=_0x4f4412-0x0;var _0x35bf19=_0x4a92[_0x4f4412];return _0x35bf19;};export{default as ExportPdf}from_0x35bf('0x0');
|
package/src/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1356=['length','hasAttribute','trim','cssText','ownerNode','indexOf','The\x20editor\x20stylesheet\x20could\x20not\x20be\x20found\x20in\x20the\x20document.\x20Check\x20your\x20webpack\x20config\x20–\x20style-loader\x20should\x20use\x20data-cke=true\x20attribute\x20for\x20the\x20editor\x20stylesheet.','data-cke',':root','warn','then','push','.ck-content','styleSheets','fetch'];(function(_0x222188,_0x13568f){const _0x258da8=function(_0x511c80){while(--_0x511c80){_0x222188['push'](_0x222188['shift']());}};_0x258da8(++_0x13568f);}(_0x1356,0xf3));const _0x258d=function(_0x222188,_0x13568f){_0x222188=_0x222188-0x0;let _0x258da8=_0x1356[_0x222188];return _0x258da8;};export function getStyles(_0x2d6bed){if(!_0x2d6bed)return new Promise(_0x52b1bd=>_0x52b1bd(''));const _0x1a0bcf=[];for(const _0x37747f of _0x2d6bed)'EDITOR_STYLES'!==_0x37747f?_0x1a0bcf['push'](window[_0x258d('0xb')](_0x37747f)[_0x258d('0x7')](_0x325c0e=>_0x325c0e['text']())):_0x1a0bcf[_0x258d('0x8')](u());return Promise['all'](_0x1a0bcf)[_0x258d('0x7')](_0x2a58b6=>_0x2a58b6['join']('\x20')[_0x258d('0xe')]());}function u(){const _0x3581c3=[],_0x5803a5=[];for(const _0xbb1af4 of document[_0x258d('0xa')])if(_0xbb1af4[_0x258d('0x1')][_0x258d('0xd')](_0x258d('0x4')))for(const _0x58435b of _0xbb1af4['cssRules'])-0x1!==_0x58435b[_0x258d('0x0')]['indexOf'](_0x258d('0x9'))?_0x3581c3[_0x258d('0x8')](_0x58435b[_0x258d('0x0')]):-0x1!==_0x58435b[_0x258d('0x0')][_0x258d('0x2')](_0x258d('0x5'))&&_0x5803a5[_0x258d('0x8')](_0x58435b[_0x258d('0x0')]);return _0x3581c3[_0x258d('0xc')]||console[_0x258d('0x6')](_0x258d('0x3')),[..._0x5803a5,..._0x3581c3]['join']('\x20')[_0x258d('0xe')]();}
|
package/theme/exportpdf.css
CHANGED
package/CHANGELOG.md
DELETED