@ckeditor/ckeditor5-easy-image 29.0.0 → 31.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 +1 -1
- package/README.md +7 -3
- package/ckeditor5-metadata.json +16 -0
- package/package.json +16 -14
- package/CHANGELOG.md +0 -134
- package/build/easy-image.js.map +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Software License Agreement
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
|
-
**CKEditor 5 Easy Image** – https://github.com/ckeditor/ckeditor5-easy-image <br>
|
|
4
|
+
**CKEditor 5 Easy Image feature** – https://github.com/ckeditor/ckeditor5-easy-image <br>
|
|
5
5
|
Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
|
|
6
6
|
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
CKEditor 5 Easy Image with Cloud Services
|
|
1
|
+
CKEditor 5 Easy Image feature with Cloud Services
|
|
2
2
|
=========================================
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-easy-image)
|
|
@@ -9,11 +9,15 @@ This package implements the [Easy Image](https://ckeditor.com/docs/ckeditor5/lat
|
|
|
9
9
|
|
|
10
10
|
Easy Image lets you easily insert images which are automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. It integrates automatically with the [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services/).
|
|
11
11
|
|
|
12
|
+
## Demo
|
|
13
|
+
|
|
14
|
+
Check out the [demo in the Easy Image feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/easy-image.html#demo).
|
|
15
|
+
|
|
12
16
|
## Documentation
|
|
13
17
|
|
|
14
|
-
See the [
|
|
18
|
+
See the [Easy Image integration](https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/easy-image.html) guide and the [plugin documentation](https://ckeditor.com/docs/ckeditor5/latest/api/easy-image.html) to learn how to enable the integration.
|
|
15
19
|
|
|
16
|
-
Check out the
|
|
20
|
+
Check out the comprehensive [image upload](https://ckeditor.com/docs/ckeditor5/latest/features/images/image-upload/image-upload.html) guide to learn about other ways to upload images into CKEditor 5.
|
|
17
21
|
|
|
18
22
|
## License
|
|
19
23
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Easy Image",
|
|
5
|
+
"className": "EasyImage",
|
|
6
|
+
"description": "An image upload tool with virtually zero server setup. The images are automatically rescaled, optimized, responsive and delivered through a CDN.",
|
|
7
|
+
"docs": "features/images/image-upload/easy-image.html",
|
|
8
|
+
"path": "src/easyimage.js",
|
|
9
|
+
"requires": [
|
|
10
|
+
"CloudServices",
|
|
11
|
+
"Image",
|
|
12
|
+
"ImageUpload"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-easy-image",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "Easy Image feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
7
7
|
"ckeditor5",
|
|
8
8
|
"ckeditor 5",
|
|
9
9
|
"ckeditor5-feature",
|
|
10
|
-
"ckeditor5-plugin"
|
|
10
|
+
"ckeditor5-plugin",
|
|
11
|
+
"ckeditor5-dll"
|
|
11
12
|
],
|
|
12
13
|
"main": "src/index.js",
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"ckeditor5": "^
|
|
15
|
+
"ckeditor5": "^31.0.0"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
|
-
"@ckeditor/ckeditor5-clipboard": "^
|
|
18
|
-
"@ckeditor/ckeditor5-cloud-services": "^
|
|
19
|
-
"@ckeditor/ckeditor5-core": "^
|
|
20
|
-
"@ckeditor/ckeditor5-dev-utils": "^25.
|
|
21
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
22
|
-
"@ckeditor/ckeditor5-image": "^
|
|
23
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
24
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
25
|
-
"@ckeditor/ckeditor5-upload": "^
|
|
26
|
-
"@ckeditor/ckeditor5-utils": "^
|
|
18
|
+
"@ckeditor/ckeditor5-clipboard": "^31.0.0",
|
|
19
|
+
"@ckeditor/ckeditor5-cloud-services": "^31.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-core": "^31.0.0",
|
|
21
|
+
"@ckeditor/ckeditor5-dev-utils": "^25.4.0",
|
|
22
|
+
"@ckeditor/ckeditor5-editor-classic": "^31.0.0",
|
|
23
|
+
"@ckeditor/ckeditor5-image": "^31.0.0",
|
|
24
|
+
"@ckeditor/ckeditor5-paragraph": "^31.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-theme-lark": "^31.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-upload": "^31.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-utils": "^31.0.0",
|
|
27
28
|
"webpack": "^4.43.0",
|
|
28
29
|
"webpack-cli": "^3.3.11"
|
|
29
30
|
},
|
|
@@ -44,7 +45,8 @@
|
|
|
44
45
|
"lang",
|
|
45
46
|
"src",
|
|
46
47
|
"theme",
|
|
47
|
-
"build"
|
|
48
|
+
"build",
|
|
49
|
+
"ckeditor5-metadata.json"
|
|
48
50
|
],
|
|
49
51
|
"scripts": {
|
|
50
52
|
"dll:build": "webpack"
|
package/CHANGELOG.md
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
Changelog
|
|
2
|
-
=========
|
|
3
|
-
|
|
4
|
-
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
|
|
5
|
-
|
|
6
|
-
Changes for the past releases are available below.
|
|
7
|
-
|
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v18.0.0...v19.0.0) (2020-04-29)
|
|
9
|
-
|
|
10
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v17.0.0...v18.0.0) (2020-03-19)
|
|
14
|
-
|
|
15
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v16.0.0...v17.0.0) (2020-02-19)
|
|
19
|
-
|
|
20
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v15.0.0...v16.0.0) (2019-12-04)
|
|
24
|
-
|
|
25
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v11.0.5...v15.0.0) (2019-10-23)
|
|
29
|
-
|
|
30
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## [11.0.5](https://github.com/ckeditor/ckeditor5-easy-image/compare/v11.0.4...v11.0.5) (2019-08-26)
|
|
34
|
-
|
|
35
|
-
### Other changes
|
|
36
|
-
|
|
37
|
-
* The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([d403f73](https://github.com/ckeditor/ckeditor5-easy-image/commit/d403f73))
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## [11.0.4](https://github.com/ckeditor/ckeditor5-easy-image/compare/v11.0.3...v11.0.4) (2019-07-10)
|
|
41
|
-
|
|
42
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## [11.0.3](https://github.com/ckeditor/ckeditor5-easy-image/compare/v11.0.2...v11.0.3) (2019-07-04)
|
|
46
|
-
|
|
47
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-easy-image/compare/v11.0.1...v11.0.2) (2019-06-05)
|
|
51
|
-
|
|
52
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-easy-image/compare/v11.0.0...v11.0.1) (2019-04-10)
|
|
56
|
-
|
|
57
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v10.0.4...v11.0.0) (2019-02-28)
|
|
61
|
-
|
|
62
|
-
### BREAKING CHANGES
|
|
63
|
-
|
|
64
|
-
* Upgraded minimal versions of Node to `8.0.0` and npm to `5.7.1`. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([612ea3c](https://github.com/ckeditor/ckeditor5-cloud-services/commit/612ea3c))
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## [10.0.4](https://github.com/ckeditor/ckeditor5-easy-image/compare/v10.0.3...v10.0.4) (2018-12-05)
|
|
68
|
-
|
|
69
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## [10.0.3](https://github.com/ckeditor/ckeditor5-easy-image/compare/v10.0.2...v10.0.3) (2018-10-08)
|
|
73
|
-
|
|
74
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## [10.0.2](https://github.com/ckeditor/ckeditor5-easy-image/compare/v10.0.1...v10.0.2) (2018-07-18)
|
|
78
|
-
|
|
79
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
## [10.0.1](https://github.com/ckeditor/ckeditor5-easy-image/compare/v10.0.0...v10.0.1) (2018-06-21)
|
|
83
|
-
|
|
84
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-easy-image/compare/v1.0.0-beta.4...v10.0.0) (2018-04-25)
|
|
88
|
-
|
|
89
|
-
### Other changes
|
|
90
|
-
|
|
91
|
-
* Changed the license to GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991). ([8371e22](https://github.com/ckeditor/ckeditor5-easy-image/commit/8371e22))
|
|
92
|
-
|
|
93
|
-
### BREAKING CHANGES
|
|
94
|
-
|
|
95
|
-
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-easy-image/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018-04-19)
|
|
99
|
-
|
|
100
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-easy-image/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018-04-10)
|
|
104
|
-
|
|
105
|
-
### Other changes
|
|
106
|
-
|
|
107
|
-
* Aligned to package names changes: `@ckeditor/ckeditor5-cloudservices` was renamed to `@ckeditor/ckeditor5-cloud-services` and `@ckeditor/ckeditor-cloudservices-core` to `@ckeditor/ckeditor-cloud-services-core`. ([ce3abaf](https://github.com/ckeditor/ckeditor5-easy-image/commit/ce3abaf))
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-easy-image/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15)
|
|
111
|
-
|
|
112
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-easy-image/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017-11-14)
|
|
116
|
-
|
|
117
|
-
### Bug fixes
|
|
118
|
-
|
|
119
|
-
* Prevented `UploadGateway` from being created when `cloudServices#tokenUrl` is not provided. Closes [#9](https://github.com/ckeditor/ckeditor5-easy-image/issues/9). ([cdc6662](https://github.com/ckeditor/ckeditor5-easy-image/commit/cdc6662))
|
|
120
|
-
|
|
121
|
-
### Other changes
|
|
122
|
-
|
|
123
|
-
* Aligned code to the new `CloudeServices` API and used the `ckeditor5-cloudservices` package. Closes [#7](https://github.com/ckeditor/ckeditor5-easy-image/issues/7). ([ce800f7](https://github.com/ckeditor/ckeditor5-easy-image/commit/ce800f7))
|
|
124
|
-
|
|
125
|
-
The plugin will now automatically refresh the token when it expired.
|
|
126
|
-
|
|
127
|
-
### BREAKING CHANGES
|
|
128
|
-
|
|
129
|
-
* The Easy Image plugin does not use `config.cloudServices.token` anymore. The new option name is `config.cloudServices.tokenUrl` with a URL to the token server.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
## 1.0.0-alpha.1 (2017-10-03)
|
|
133
|
-
|
|
134
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
package/build/easy-image.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://CKEditor5.easyImage/webpack/bootstrap","webpack://CKEditor5.easyImage/./src/cloudservicesuploadadapter.js","webpack://CKEditor5.easyImage/./src/easyimage.js","webpack://CKEditor5.easyImage/./src/index.js","webpack://CKEditor5.easyImage/delegated ./cloud-services-core.js from dll-reference CKEditor5.dll","webpack://CKEditor5.easyImage/delegated ./core.js from dll-reference CKEditor5.dll","webpack://CKEditor5.easyImage/delegated ./upload.js from dll-reference CKEditor5.dll","webpack://CKEditor5.easyImage/external \"CKEditor5.dll\""],"names":[],"mappings":";;;;;;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;AACU;AACY;;AAElE;AACA;AACA;AACA,6BAA6B,4CAA4C;AACzE;AACA;AACA,IAAI,qFAAqF;AACzF;AACA;AACA;AACe,yCAAyC,yDAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,mEAAc;AAC1C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,sBAAsB,mEAAc;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C,+EAAa;;;;;;;;;;;;;AC3FzD;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAE0B;;AAEtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8EAA8E;AACpF;AACA;AACA;AACA,MAAM,+BAA+B;AACrC,MAAM,2CAA2C;AACjD;AACA,YAAY,uEAAuE;AACnF;AACA;AACA,kBAAkB,6EAA6E;AAC/F;AACA;AACA;AACA;AACA,wBAAwB,qFAAqF;AAC7G;AACA;AACA;AACe,wBAAwB,yDAAM;AAC7C;AACA;AACA;AACA;AACA,WAAW,mEAA0B;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrDA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEoC;AACkC;;AAEvD;AACf,CAAC,6DAAS;AACV,CAAC,+FAA0B;AAC3B,CAAC,EAAC;;;;;;;;;;;;ACfF,yI;;;;;;;;;;;ACAA,0H;;;;;;;;;;;ACAA,4H;;;;;;;;;;;ACAA,+B","file":"easy-image.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.js\");\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n* @module easy-image/cloudservicesuploadadapter\n*/\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { FileRepository } from 'ckeditor5/src/upload';\nimport { UploadGateway } from 'ckeditor5/src/cloud-services-core';\n\n/**\n * A plugin that enables upload to [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services/).\n *\n * It is mainly used by the {@link module:easy-image/easyimage~EasyImage} feature.\n *\n * After enabling this adapter you need to configure the CKEditor Cloud Services integration through\n * {@link module:cloud-services/cloudservices~CloudServicesConfig `config.cloudServices`}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class CloudServicesUploadAdapter extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'CloudServicesUploadAdapter';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ 'CloudServices', FileRepository ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\n\t\tconst cloudServices = editor.plugins.get( 'CloudServices' );\n\n\t\tconst token = cloudServices.token;\n\t\tconst uploadUrl = cloudServices.uploadUrl;\n\n\t\tif ( !token ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._uploadGateway = new CloudServicesUploadAdapter._UploadGateway( token, uploadUrl );\n\n\t\teditor.plugins.get( FileRepository ).createUploadAdapter = loader => {\n\t\t\treturn new Adapter( this._uploadGateway, loader );\n\t\t};\n\t}\n}\n\n/**\n * @private\n */\nclass Adapter {\n\tconstructor( uploadGateway, loader ) {\n\t\tthis.uploadGateway = uploadGateway;\n\n\t\tthis.loader = loader;\n\t}\n\n\tupload() {\n\t\treturn this.loader.file.then( file => {\n\t\t\tthis.fileUploader = this.uploadGateway.upload( file );\n\n\t\t\tthis.fileUploader.on( 'progress', ( evt, data ) => {\n\t\t\t\tthis.loader.uploadTotal = data.total;\n\t\t\t\tthis.loader.uploaded = data.uploaded;\n\t\t\t} );\n\n\t\t\treturn this.fileUploader.send();\n\t\t} );\n\t}\n\n\tabort() {\n\t\tthis.fileUploader.abort();\n\t}\n}\n\n// Store the API in static property to easily overwrite it in tests.\n// Too bad dependency injection does not work in Webpack + ES 6 (const) + Babel.\nCloudServicesUploadAdapter._UploadGateway = UploadGateway;\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module easy-image/easyimage\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport CloudServicesUploadAdapter from './cloudservicesuploadadapter';\n\n/**\n * The Easy Image feature, which makes the image upload in CKEditor 5 possible with virtually zero\n * server setup. A part of the [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services/)\n * family.\n *\n * This is a \"glue\" plugin which enables:\n *\n * * {@link module:easy-image/cloudservicesuploadadapter~CloudServicesUploadAdapter}.\n *\n * This plugin requires plugin to be present in the editor configuration:\n *\n * * {@link module:image/image~Image},\n * * {@link module:image/imageupload~ImageUpload},\n *\n * See the {@glink features/image-upload/easy-image \"Easy Image integration\" guide} to learn how to configure\n * and use this feature.\n *\n * Check out the {@glink features/image-upload/image-upload comprehensive \"Image upload\" guide} to learn about\n * other ways to upload images into CKEditor 5.\n *\n * **Note**: After enabling the Easy Image plugin you need to configure the\n * [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services/)\n * integration through {@link module:cloud-services/cloudservices~CloudServicesConfig `config.cloudServices`}.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class EasyImage extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ CloudServicesUploadAdapter, 'Image', 'ImageUpload' ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'EasyImage';\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module easy-image\n */\n\nimport EasyImage from './easyimage';\nimport CloudServicesUploadAdapter from './cloudservicesuploadadapter';\n\nexport default {\n\tEasyImage,\n\tCloudServicesUploadAdapter\n};\n","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/cloud-services-core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/upload.js\");","module.exports = CKEditor5.dll;"],"sourceRoot":""}
|