@ckeditor/ckeditor5-ckbox 44.1.0-alpha.5 → 44.2.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.md +1 -1
- package/build/ckbox.js +2 -2
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +27 -10
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/gu.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/kk.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/oc.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sl.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/ti.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +32 -8
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/ckbox.d.ts +1 -1
- package/src/ckbox.js +1 -1
- package/src/ckboxcommand.d.ts +1 -1
- package/src/ckboxcommand.js +27 -9
- package/src/ckboxconfig.d.ts +17 -1
- package/src/ckboxconfig.js +1 -1
- package/src/ckboxediting.d.ts +1 -1
- package/src/ckboxediting.js +1 -1
- package/src/ckboximageedit/ckboximageeditcommand.d.ts +1 -1
- package/src/ckboximageedit/ckboximageeditcommand.js +1 -1
- package/src/ckboximageedit/ckboximageeditediting.d.ts +1 -1
- package/src/ckboximageedit/ckboximageeditediting.js +1 -1
- package/src/ckboximageedit/ckboximageeditui.d.ts +1 -1
- package/src/ckboximageedit/ckboximageeditui.js +1 -1
- package/src/ckboximageedit/utils.d.ts +1 -1
- package/src/ckboximageedit/utils.js +1 -1
- package/src/ckboximageedit.d.ts +1 -1
- package/src/ckboximageedit.js +1 -1
- package/src/ckboxui.d.ts +1 -1
- package/src/ckboxui.js +1 -1
- package/src/ckboxuploadadapter.d.ts +1 -1
- package/src/ckboxuploadadapter.js +1 -1
- package/src/ckboxutils.d.ts +1 -1
- package/src/ckboxutils.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/utils.d.ts +1 -1
- package/src/utils.js +1 -1
- package/theme/ckboximageedit.css +1 -1
- package/dist/augmentation.d.ts +0 -36
- package/dist/ckbox.d.ts +0 -41
- package/dist/ckboxcommand.d.ts +0 -130
- package/dist/ckboxconfig.d.ts +0 -434
- package/dist/ckboxediting.d.ts +0 -65
- package/dist/ckboximageedit/ckboximageeditcommand.d.ts +0 -109
- package/dist/ckboximageedit/ckboximageeditediting.d.ts +0 -36
- package/dist/ckboximageedit/ckboximageeditui.d.ts +0 -32
- package/dist/ckboximageedit/utils.d.ts +0 -14
- package/dist/ckboximageedit.d.ts +0 -32
- package/dist/ckboxui.d.ts +0 -60
- package/dist/ckboxuploadadapter.d.ts +0 -41
- package/dist/ckboxutils.d.ts +0 -58
- package/dist/index.d.ts +0 -21
- package/dist/utils.d.ts +0 -67
package/lang/translations/es.po
CHANGED
package/lang/translations/et.po
CHANGED
package/lang/translations/eu.po
CHANGED
package/lang/translations/fa.po
CHANGED
package/lang/translations/fi.po
CHANGED
package/lang/translations/fr.po
CHANGED
package/lang/translations/gl.po
CHANGED
package/lang/translations/gu.po
CHANGED
package/lang/translations/he.po
CHANGED
package/lang/translations/hi.po
CHANGED
package/lang/translations/hr.po
CHANGED
package/lang/translations/hu.po
CHANGED
package/lang/translations/hy.po
CHANGED
package/lang/translations/id.po
CHANGED
package/lang/translations/it.po
CHANGED
package/lang/translations/ja.po
CHANGED
package/lang/translations/jv.po
CHANGED
package/lang/translations/kk.po
CHANGED
package/lang/translations/km.po
CHANGED
package/lang/translations/kn.po
CHANGED
package/lang/translations/ko.po
CHANGED
package/lang/translations/ku.po
CHANGED
package/lang/translations/lt.po
CHANGED
package/lang/translations/lv.po
CHANGED
package/lang/translations/ms.po
CHANGED
package/lang/translations/nb.po
CHANGED
package/lang/translations/ne.po
CHANGED
package/lang/translations/nl.po
CHANGED
package/lang/translations/no.po
CHANGED
package/lang/translations/oc.po
CHANGED
package/lang/translations/pl.po
CHANGED
package/lang/translations/pt.po
CHANGED
package/lang/translations/ro.po
CHANGED
package/lang/translations/ru.po
CHANGED
package/lang/translations/si.po
CHANGED
package/lang/translations/sk.po
CHANGED
package/lang/translations/sl.po
CHANGED
package/lang/translations/sq.po
CHANGED
package/lang/translations/sr.po
CHANGED
package/lang/translations/sv.po
CHANGED
package/lang/translations/th.po
CHANGED
package/lang/translations/ti.po
CHANGED
package/lang/translations/tk.po
CHANGED
package/lang/translations/tr.po
CHANGED
package/lang/translations/tt.po
CHANGED
package/lang/translations/ug.po
CHANGED
package/lang/translations/uk.po
CHANGED
package/lang/translations/ur.po
CHANGED
package/lang/translations/uz.po
CHANGED
package/lang/translations/vi.po
CHANGED
package/lang/translations/zh.po
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-ckbox",
|
3
|
-
"version": "44.
|
3
|
+
"version": "44.2.0-alpha.0",
|
4
4
|
"description": "CKBox integration for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -13,12 +13,14 @@
|
|
13
13
|
"type": "module",
|
14
14
|
"main": "src/index.js",
|
15
15
|
"dependencies": {
|
16
|
-
"@ckeditor/ckeditor5-
|
17
|
-
"@ckeditor/ckeditor5-
|
18
|
-
"@ckeditor/ckeditor5-
|
19
|
-
"@ckeditor/ckeditor5-
|
20
|
-
"@ckeditor/ckeditor5-
|
21
|
-
"ckeditor5": "44.
|
16
|
+
"@ckeditor/ckeditor5-cloud-services": "44.2.0-alpha.0",
|
17
|
+
"@ckeditor/ckeditor5-core": "44.2.0-alpha.0",
|
18
|
+
"@ckeditor/ckeditor5-engine": "44.2.0-alpha.0",
|
19
|
+
"@ckeditor/ckeditor5-image": "44.2.0-alpha.0",
|
20
|
+
"@ckeditor/ckeditor5-ui": "44.2.0-alpha.0",
|
21
|
+
"@ckeditor/ckeditor5-upload": "44.2.0-alpha.0",
|
22
|
+
"@ckeditor/ckeditor5-utils": "44.2.0-alpha.0",
|
23
|
+
"ckeditor5": "44.2.0-alpha.0",
|
22
24
|
"blurhash": "2.0.5",
|
23
25
|
"lodash-es": "4.17.21"
|
24
26
|
},
|
@@ -41,5 +43,27 @@
|
|
41
43
|
"ckeditor5-metadata.json",
|
42
44
|
"CHANGELOG.md"
|
43
45
|
],
|
44
|
-
"types": "src/index.d.ts"
|
46
|
+
"types": "src/index.d.ts",
|
47
|
+
"exports": {
|
48
|
+
".": {
|
49
|
+
"types": "./src/index.d.ts",
|
50
|
+
"import": "./src/index.js",
|
51
|
+
"default": "./src/index.js"
|
52
|
+
},
|
53
|
+
"./dist/*": {
|
54
|
+
"types": "./src/index.d.ts",
|
55
|
+
"import": "./dist/*",
|
56
|
+
"default": "./dist/*"
|
57
|
+
},
|
58
|
+
"./src/*": {
|
59
|
+
"types": "./src/*.d.ts",
|
60
|
+
"import": "./src/*",
|
61
|
+
"default": "./src/*"
|
62
|
+
},
|
63
|
+
"./build/*": "./build/*",
|
64
|
+
"./lang/*": "./lang/*",
|
65
|
+
"./theme/*": "./theme/*",
|
66
|
+
"./ckeditor5-metadata.json": "./ckeditor5-metadata.json",
|
67
|
+
"./package.json": "./package.json"
|
68
|
+
}
|
45
69
|
}
|
package/src/augmentation.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
import type { CKBox, CKBoxCommand, CKBoxConfig, CKBoxEditing, CKBoxImageEdit, CKBoxImageEditEditing, CKBoxImageEditCommand, CKBoxImageEditUI } from './index.js';
|
package/src/augmentation.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
export {};
|
package/src/ckbox.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
/**
|
package/src/ckbox.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
/**
|
package/src/ckboxcommand.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
package/src/ckboxcommand.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
import { Command } from 'ckeditor5/src/core.js';
|
@@ -154,6 +154,7 @@ export default class CKBoxCommand extends Command {
|
|
154
154
|
const editor = this.editor;
|
155
155
|
const model = editor.model;
|
156
156
|
const shouldInsertDataId = !editor.config.get('ckbox.ignoreDataId');
|
157
|
+
const downloadableFilesConfig = editor.config.get('ckbox.downloadableFiles');
|
157
158
|
// Refresh the command after firing the `ckbox:*` event.
|
158
159
|
this.on('ckbox', () => {
|
159
160
|
this.refresh();
|
@@ -185,6 +186,7 @@ export default class CKBoxCommand extends Command {
|
|
185
186
|
const linkCommand = editor.commands.get('link');
|
186
187
|
const assetsToProcess = prepareAssets({
|
187
188
|
assets,
|
189
|
+
downloadableFilesConfig,
|
188
190
|
isImageAllowed: imageCommand.isEnabled,
|
189
191
|
isLinkAllowed: linkCommand.isEnabled
|
190
192
|
});
|
@@ -298,7 +300,7 @@ export default class CKBoxCommand extends Command {
|
|
298
300
|
/**
|
299
301
|
* Parses the chosen assets into the internal data format. Filters out chosen assets that are not allowed.
|
300
302
|
*/
|
301
|
-
function prepareAssets({ assets, isImageAllowed, isLinkAllowed }) {
|
303
|
+
function prepareAssets({ downloadableFilesConfig, assets, isImageAllowed, isLinkAllowed }) {
|
302
304
|
return assets
|
303
305
|
.map(asset => isImage(asset) ?
|
304
306
|
{
|
@@ -309,7 +311,7 @@ function prepareAssets({ assets, isImageAllowed, isLinkAllowed }) {
|
|
309
311
|
{
|
310
312
|
id: asset.data.id,
|
311
313
|
type: 'link',
|
312
|
-
attributes: prepareLinkAssetAttributes(asset)
|
314
|
+
attributes: prepareLinkAssetAttributes(asset, downloadableFilesConfig)
|
313
315
|
})
|
314
316
|
.filter(asset => asset.type === 'image' ? isImageAllowed : isLinkAllowed);
|
315
317
|
}
|
@@ -334,12 +336,13 @@ export function prepareImageAssetAttributes(asset) {
|
|
334
336
|
/**
|
335
337
|
* Parses the assets attributes into the internal data format.
|
336
338
|
*
|
337
|
-
* @param
|
339
|
+
* @param asset The asset to prepare the attributes for.
|
340
|
+
* @param config The CKBox download asset configuration.
|
338
341
|
*/
|
339
|
-
function prepareLinkAssetAttributes(asset) {
|
342
|
+
function prepareLinkAssetAttributes(asset, config) {
|
340
343
|
return {
|
341
344
|
linkName: asset.data.name,
|
342
|
-
linkHref: getAssetUrl(asset)
|
345
|
+
linkHref: getAssetUrl(asset, config)
|
343
346
|
};
|
344
347
|
}
|
345
348
|
/**
|
@@ -355,10 +358,25 @@ function isImage(asset) {
|
|
355
358
|
/**
|
356
359
|
* Creates the URL for the asset.
|
357
360
|
*
|
358
|
-
* @param
|
361
|
+
* @param asset The asset to create the URL for.
|
362
|
+
* @param config The CKBox download asset configuration.
|
359
363
|
*/
|
360
|
-
function getAssetUrl(asset) {
|
364
|
+
function getAssetUrl(asset, config) {
|
361
365
|
const url = new URL(asset.data.url);
|
362
|
-
|
366
|
+
if (isDownloadableAsset(asset, config)) {
|
367
|
+
url.searchParams.set('download', 'true');
|
368
|
+
}
|
363
369
|
return url.toString();
|
364
370
|
}
|
371
|
+
/**
|
372
|
+
* Determines if download should be enabled for given asset based on configuration.
|
373
|
+
*
|
374
|
+
* @param asset The asset to check.
|
375
|
+
* @param config The CKBox download asset configuration.
|
376
|
+
*/
|
377
|
+
function isDownloadableAsset(asset, config) {
|
378
|
+
if (typeof config === 'function') {
|
379
|
+
return config(asset);
|
380
|
+
}
|
381
|
+
return true;
|
382
|
+
}
|
package/src/ckboxconfig.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
/**
|
@@ -156,6 +156,18 @@ export interface CKBoxConfig {
|
|
156
156
|
* ```
|
157
157
|
*/
|
158
158
|
choosableFileExtensions?: Array<string>;
|
159
|
+
/**
|
160
|
+
* Controls when to enable the download attribute for inserted links.
|
161
|
+
*
|
162
|
+
* By default, files are downloadable.
|
163
|
+
*
|
164
|
+
* ```ts
|
165
|
+
* const ckboxConfig = {
|
166
|
+
* downloadableFiles: asset => asset.data.extension !== 'pdf'
|
167
|
+
* };
|
168
|
+
* ```
|
169
|
+
*/
|
170
|
+
downloadableFiles?: (asset: CKBoxRawAssetDefinition) => boolean;
|
159
171
|
}
|
160
172
|
export interface CKBoxDialogConfig {
|
161
173
|
/**
|
@@ -402,6 +414,10 @@ export interface CKBoxRawAssetDataDefinition {
|
|
402
414
|
* The asset location.
|
403
415
|
*/
|
404
416
|
url: string;
|
417
|
+
/**
|
418
|
+
* The asset type.
|
419
|
+
*/
|
420
|
+
extension?: string;
|
405
421
|
}
|
406
422
|
/**
|
407
423
|
* Part of raw asset data that is received from the CKBox feature. Properties are set only if the chosen asset is an image.
|
package/src/ckboxconfig.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Copyright (c) 2003-
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
export {};
|