@ckeditor/ckeditor5-ckbox 0.0.0-nightly-20231205.0 → 0.0.0-nightly-20231207.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. package/build/ckbox.js +2 -2
  2. package/build/translations/ar.js +1 -1
  3. package/build/translations/az.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/ca.js +1 -1
  7. package/build/translations/cs.js +1 -1
  8. package/build/translations/da.js +1 -1
  9. package/build/translations/de.js +1 -1
  10. package/build/translations/el.js +1 -1
  11. package/build/translations/en-au.js +1 -1
  12. package/build/translations/es-co.js +1 -1
  13. package/build/translations/es.js +1 -1
  14. package/build/translations/et.js +1 -1
  15. package/build/translations/fa.js +1 -1
  16. package/build/translations/fi.js +1 -1
  17. package/build/translations/fr.js +1 -1
  18. package/build/translations/gl.js +1 -1
  19. package/build/translations/he.js +1 -1
  20. package/build/translations/hi.js +1 -1
  21. package/build/translations/hr.js +1 -1
  22. package/build/translations/hu.js +1 -1
  23. package/build/translations/id.js +1 -1
  24. package/build/translations/it.js +1 -1
  25. package/build/translations/ja.js +1 -1
  26. package/build/translations/ko.js +1 -1
  27. package/build/translations/lt.js +1 -1
  28. package/build/translations/lv.js +1 -1
  29. package/build/translations/ms.js +1 -1
  30. package/build/translations/nl.js +1 -1
  31. package/build/translations/no.js +1 -1
  32. package/build/translations/pl.js +1 -1
  33. package/build/translations/pt-br.js +1 -1
  34. package/build/translations/pt.js +1 -1
  35. package/build/translations/ro.js +1 -1
  36. package/build/translations/ru.js +1 -1
  37. package/build/translations/sk.js +1 -1
  38. package/build/translations/sq.js +1 -1
  39. package/build/translations/sr-latn.js +1 -1
  40. package/build/translations/sr.js +1 -1
  41. package/build/translations/sv.js +1 -1
  42. package/build/translations/th.js +1 -1
  43. package/build/translations/tr.js +1 -1
  44. package/build/translations/ug.js +1 -1
  45. package/build/translations/uk.js +1 -1
  46. package/build/translations/ur.js +1 -1
  47. package/build/translations/uz.js +1 -1
  48. package/build/translations/vi.js +1 -1
  49. package/build/translations/zh-cn.js +1 -1
  50. package/build/translations/zh.js +1 -1
  51. package/lang/contexts.json +2 -1
  52. package/lang/translations/ar.po +18 -2
  53. package/lang/translations/az.po +18 -2
  54. package/lang/translations/bg.po +18 -2
  55. package/lang/translations/bn.po +18 -2
  56. package/lang/translations/ca.po +18 -2
  57. package/lang/translations/cs.po +18 -2
  58. package/lang/translations/da.po +18 -2
  59. package/lang/translations/de.po +18 -2
  60. package/lang/translations/el.po +18 -2
  61. package/lang/translations/en-au.po +18 -2
  62. package/lang/translations/en.po +18 -2
  63. package/lang/translations/es-co.po +18 -2
  64. package/lang/translations/es.po +18 -2
  65. package/lang/translations/et.po +18 -2
  66. package/lang/translations/fa.po +18 -2
  67. package/lang/translations/fi.po +18 -2
  68. package/lang/translations/fr.po +18 -2
  69. package/lang/translations/gl.po +18 -2
  70. package/lang/translations/he.po +18 -2
  71. package/lang/translations/hi.po +18 -2
  72. package/lang/translations/hr.po +18 -2
  73. package/lang/translations/hu.po +18 -2
  74. package/lang/translations/id.po +18 -2
  75. package/lang/translations/it.po +18 -2
  76. package/lang/translations/ja.po +18 -2
  77. package/lang/translations/ko.po +18 -2
  78. package/lang/translations/lt.po +18 -2
  79. package/lang/translations/lv.po +18 -2
  80. package/lang/translations/ms.po +18 -2
  81. package/lang/translations/nl.po +18 -2
  82. package/lang/translations/no.po +18 -2
  83. package/lang/translations/pl.po +18 -2
  84. package/lang/translations/pt-br.po +18 -2
  85. package/lang/translations/pt.po +18 -2
  86. package/lang/translations/ro.po +18 -2
  87. package/lang/translations/ru.po +18 -2
  88. package/lang/translations/sk.po +18 -2
  89. package/lang/translations/sq.po +18 -2
  90. package/lang/translations/sr-latn.po +18 -2
  91. package/lang/translations/sr.po +18 -2
  92. package/lang/translations/sv.po +18 -2
  93. package/lang/translations/th.po +18 -2
  94. package/lang/translations/tr.po +18 -2
  95. package/lang/translations/ug.po +18 -2
  96. package/lang/translations/uk.po +18 -2
  97. package/lang/translations/ur.po +18 -2
  98. package/lang/translations/uz.po +18 -2
  99. package/lang/translations/vi.po +18 -2
  100. package/lang/translations/zh-cn.po +18 -2
  101. package/lang/translations/zh.po +18 -2
  102. package/package.json +2 -2
  103. package/src/ckboxconfig.d.ts +18 -0
  104. package/src/ckboxediting.d.ts +5 -12
  105. package/src/ckboxediting.js +7 -55
  106. package/src/ckboximageedit/ckboximageeditcommand.d.ts +10 -1
  107. package/src/ckboximageedit/ckboximageeditcommand.js +55 -23
  108. package/src/ckboximageedit/ckboximageeditediting.d.ts +3 -1
  109. package/src/ckboximageedit/ckboximageeditediting.js +3 -1
  110. package/src/ckboximageedit/utils.d.ts +10 -0
  111. package/src/ckboximageedit/utils.js +48 -0
  112. package/src/ckboximageedit.d.ts +1 -2
  113. package/src/ckboximageedit.js +1 -2
  114. package/src/ckboxui.js +28 -1
  115. package/src/ckboxuploadadapter.d.ts +0 -5
  116. package/src/ckboxuploadadapter.js +10 -111
  117. package/src/ckboxutils.d.ts +51 -0
  118. package/src/ckboxutils.js +184 -0
  119. package/src/utils.d.ts +8 -0
  120. package/src/utils.js +36 -0
  121. package/theme/icons/ckbox-image-edit.svg +1 -1
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Otvori upravljač datotekama"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Nije moguće odrediti kategoriju za otpremljenu datoteku."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
+ msgstr "Nije moguće pristupiti podrazumevanom radnom prostoru."
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
30
46
  msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Oтвори управљач датотекама."
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Није могуће одредити категорију за отпремлјену датотеку."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "Nije moguće pristupiti podrazumevanom radnom prostoru."
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Öppna filhanterare"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Kan inte avgöra kategorin på den uppladdade filen."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "Kan inte komma åt standardarbetsytan."
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "เปิดเครื่องมือจัดการไฟล์"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "ไม่สามารถกำหนดหมวดหมู่สำหรับไฟล์ที่อัปโหลด"
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "ไม่สามารถเข้าถึงพื้นที่ทำงานเริ่มต้น"
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Dosya yöneticisini aç"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Yüklenen dosya için bir kategori belirlenemiyor."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "Varsayılan çalışma alanına erişilemiyor."
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "ھۆججەت باشقۇرغۇچنى ئاچ"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "يۈكلەيدىغان ھۆججەتنىڭ تۈرىنى جەزملىيەلمىدى."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "كۆڭۈلدىكى خىزمەت بوشلۇقىنى زىيارەت قىلالمايدۇ"
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Відкрити менеджер файлів"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Не вдається визначити категорію для завантаженого файлу."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "Немає доступу до робочого простору за замовчуванням."
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "فائل مینیجر کھولیں"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "اپلوڈ کی گئی فائل کا ذمرے کا تعین نہیں ہو سکا"
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr ""
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Fayl menejerini ochish"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Yuklangan fayl uchun toifani aniqlab bo‘lmadi."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr ""
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "Mở trình quản lý tệp"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "Không thể xác định danh mục cho tệp được tải lên."
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "Không thể truy cập vào không gian làm việc mặc định."
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "打开文件管理器"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "无法确定上传文件的类别。"
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "无法访问默认工作区"
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
@@ -17,7 +17,7 @@ msgstr ""
17
17
  "Plural-Forms: nplurals=1; plural=0;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
- msgctxt "Toolbar button tooltip for opening a file browser that allows inserting an image or a file to the editor."
20
+ msgctxt "A toolbar button tooltip for opening the file browser that allows inserting an image or a file to the editor."
21
21
  msgid "Open file manager"
22
22
  msgstr "開啟檔案管理程式"
23
23
 
@@ -25,6 +25,22 @@ msgctxt "A message is displayed when CKEditor 5 cannot associate an image with a
25
25
  msgid "Cannot determine a category for the uploaded file."
26
26
  msgstr "無法確定上傳檔案的分類。"
27
27
 
28
- msgctxt "A message is displayed when the user is not authorised to access CKBox workspace configured as default one."
28
+ msgctxt "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one."
29
29
  msgid "Cannot access default workspace."
30
30
  msgstr "無法存取預設工作區。"
31
+
32
+ msgctxt "Image toolbar button tooltip for opening a dialog to manipulate the image."
33
+ msgid "Edit image"
34
+ msgstr ""
35
+
36
+ msgctxt "A message stating that image editing is in progress."
37
+ msgid "Processing the edited image."
38
+ msgstr ""
39
+
40
+ msgctxt "A message is displayed when the server fails to process an image or doesn't respond."
41
+ msgid "Server failed to process the image."
42
+ msgstr ""
43
+
44
+ msgctxt "A message is displayed when category of the image user wants to edit can't be determined."
45
+ msgid "Failed to determine category of edited image."
46
+ msgstr ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ckbox",
3
- "version": "0.0.0-nightly-20231205.0",
3
+ "version": "0.0.0-nightly-20231207.0",
4
4
  "description": "CKBox integration for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "ckeditor5": "0.0.0-nightly-20231205.0",
15
+ "ckeditor5": "0.0.0-nightly-20231207.0",
16
16
  "blurhash": "^2.0.5",
17
17
  "lodash-es": "4.17.21"
18
18
  },
@@ -6,6 +6,7 @@
6
6
  * @module ckbox/ckboxconfig
7
7
  */
8
8
  import type { TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
9
+ import type { ArrayOrItem } from 'ckeditor5/src/utils';
9
10
  /**
10
11
  * The configuration of the {@link module:ckbox/ckbox~CKBox CKBox feature}.
11
12
  *
@@ -89,6 +90,23 @@ export interface CKBoxConfig {
89
90
  * Enforces displaying the "Powered by CKBox" link regardless of the CKBox plan used.
90
91
  */
91
92
  forceDemoLabel?: boolean;
93
+ /**
94
+ * Allows editing images that are not hosted in CKBox service.
95
+ *
96
+ * This configuration option should whitelist URL(s) of images that should be editable.
97
+ * Make sure that allowed image resources have CORS enabled.
98
+ *
99
+ * The image is editable if this option is:
100
+ * * a regular expression and it matches the image URL, or
101
+ * * a custom function that returns `true` for the image URL, or
102
+ * * `'origin'` literal and the image URL is from the same origin, or
103
+ * * an array of the above and the image URL matches one of the array elements.
104
+ *
105
+ * Images hosted in CKBox are always editable.
106
+ *
107
+ * @default []
108
+ */
109
+ allowExternalImagesEditing?: ArrayOrItem<RegExp | 'origin' | ((src: string) => boolean)>;
92
110
  /**
93
111
  * Inserts the unique asset ID as the `data-ckbox-resource-id` attribute. To disable this behavior, set it to `true`.
94
112
  *
@@ -2,12 +2,9 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
- /**
6
- * @module ckbox/ckboxediting
7
- */
8
- import type { InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
9
5
  import { Plugin } from 'ckeditor5/src/core';
10
6
  import CKBoxUploadAdapter from './ckboxuploadadapter';
7
+ import CKBoxUtils from './ckboxutils';
11
8
  /**
12
9
  * The CKBox editing feature. It introduces the {@link module:ckbox/ckboxcommand~CKBoxCommand CKBox command} and
13
10
  * {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
@@ -24,19 +21,15 @@ export default class CKBoxEditing extends Plugin {
24
21
  /**
25
22
  * @inheritDoc
26
23
  */
27
- static get requires(): readonly ["CloudServices", "LinkEditing", "PictureEditing", typeof CKBoxUploadAdapter];
24
+ static get requires(): readonly ["LinkEditing", "PictureEditing", typeof CKBoxUploadAdapter, typeof CKBoxUtils];
28
25
  /**
29
26
  * @inheritDoc
30
27
  */
31
- init(): Promise<void>;
32
- /**
33
- * Returns a token used by the CKBox plugin for communication with the CKBox service.
34
- */
35
- getToken(): InitializedToken;
28
+ init(): void;
36
29
  /**
37
- * Initializes the `ckbox` editor configuration.
30
+ * Checks if the at least one image plugin is loaded.
38
31
  */
39
- private _initConfig;
32
+ private _checkImagePlugins;
40
33
  /**
41
34
  * Extends the schema to allow the `ckboxImageId` and `ckboxLinkId` attributes for links and images.
42
35
  */
@@ -4,10 +4,10 @@
4
4
  */
5
5
  import { Plugin } from 'ckeditor5/src/core';
6
6
  import { Range } from 'ckeditor5/src/engine';
7
- import { CKEditorError, logError } from 'ckeditor5/src/utils';
7
+ import { logError } from 'ckeditor5/src/utils';
8
8
  import CKBoxCommand from './ckboxcommand';
9
9
  import CKBoxUploadAdapter from './ckboxuploadadapter';
10
- const DEFAULT_CKBOX_THEME_NAME = 'lark';
10
+ import CKBoxUtils from './ckboxutils';
11
11
  /**
12
12
  * The CKBox editing feature. It introduces the {@link module:ckbox/ckboxcommand~CKBoxCommand CKBox command} and
13
13
  * {@link module:ckbox/ckboxuploadadapter~CKBoxUploadAdapter CKBox upload adapter}.
@@ -23,12 +23,12 @@ export default class CKBoxEditing extends Plugin {
23
23
  * @inheritDoc
24
24
  */
25
25
  static get requires() {
26
- return ['CloudServices', 'LinkEditing', 'PictureEditing', CKBoxUploadAdapter];
26
+ return ['LinkEditing', 'PictureEditing', CKBoxUploadAdapter, CKBoxUtils];
27
27
  }
28
28
  /**
29
29
  * @inheritDoc
30
30
  */
31
- async init() {
31
+ init() {
32
32
  const editor = this.editor;
33
33
  const hasConfiguration = !!editor.config.get('ckbox');
34
34
  const isLibraryLoaded = !!window.CKBox;
@@ -37,20 +37,7 @@ export default class CKBoxEditing extends Plugin {
37
37
  if (!hasConfiguration && !isLibraryLoaded) {
38
38
  return;
39
39
  }
40
- this._initConfig();
41
- const cloudServicesCore = editor.plugins.get('CloudServicesCore');
42
- const ckboxTokenUrl = editor.config.get('ckbox.tokenUrl');
43
- const cloudServicesTokenUrl = editor.config.get('cloudServices.tokenUrl');
44
- // To avoid fetching the same token twice we need to compare the `ckbox.tokenUrl` and `cloudServices.tokenUrl` values.
45
- // If they are equal, it's enough to take the token generated by the `CloudServices` plugin.
46
- if (ckboxTokenUrl === cloudServicesTokenUrl) {
47
- const cloudServices = editor.plugins.get('CloudServices');
48
- this._token = cloudServices.token;
49
- }
50
- // Otherwise, create a new token manually.
51
- else {
52
- this._token = await cloudServicesCore.createToken(ckboxTokenUrl).init();
53
- }
40
+ this._checkImagePlugins();
54
41
  // Extending the schema, registering converters and applying fixers only make sense if the configuration option to assign
55
42
  // the assets ID with the model elements is enabled.
56
43
  if (!editor.config.get('ckbox.ignoreDataId')) {
@@ -64,45 +51,10 @@ export default class CKBoxEditing extends Plugin {
64
51
  }
65
52
  }
66
53
  /**
67
- * Returns a token used by the CKBox plugin for communication with the CKBox service.
68
- */
69
- getToken() {
70
- return this._token;
71
- }
72
- /**
73
- * Initializes the `ckbox` editor configuration.
54
+ * Checks if the at least one image plugin is loaded.
74
55
  */
75
- _initConfig() {
56
+ _checkImagePlugins() {
76
57
  const editor = this.editor;
77
- editor.config.define('ckbox', {
78
- serviceOrigin: 'https://api.ckbox.io',
79
- defaultUploadCategories: null,
80
- ignoreDataId: false,
81
- language: editor.locale.uiLanguage,
82
- theme: DEFAULT_CKBOX_THEME_NAME,
83
- tokenUrl: editor.config.get('cloudServices.tokenUrl')
84
- });
85
- const tokenUrl = editor.config.get('ckbox.tokenUrl');
86
- if (!tokenUrl) {
87
- /**
88
- * The {@link module:ckbox/ckboxconfig~CKBoxConfig#tokenUrl `config.ckbox.tokenUrl`} or the
89
- * {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl `config.cloudServices.tokenUrl`}
90
- * configuration is required for the CKBox plugin.
91
- *
92
- * ```ts
93
- * ClassicEditor.create( document.createElement( 'div' ), {
94
- * ckbox: {
95
- * tokenUrl: "YOUR_TOKEN_URL"
96
- * // ...
97
- * }
98
- * // ...
99
- * } );
100
- * ```
101
- *
102
- * @error ckbox-plugin-missing-token-url
103
- */
104
- throw new CKEditorError('ckbox-plugin-missing-token-url', this);
105
- }
106
58
  if (!editor.plugins.has('ImageBlockEditing') && !editor.plugins.has('ImageInlineEditing')) {
107
59
  /**
108
60
  * The CKBox feature requires one of the following plugins to be loaded to work correctly:
@@ -24,6 +24,14 @@ export default class CKBoxImageEditCommand extends Command {
24
24
  * The states of image processing in progress.
25
25
  */
26
26
  private _processInProgress;
27
+ /**
28
+ * Determines if the element can be edited.
29
+ */
30
+ private _canEdit;
31
+ /**
32
+ * A wrapper function to prepare mount options. Ensures that at most one preparation is in-flight.
33
+ */
34
+ private _prepareOptions;
27
35
  /**
28
36
  * @inheritDoc
29
37
  */
@@ -47,7 +55,7 @@ export default class CKBoxImageEditCommand extends Command {
47
55
  /**
48
56
  * Creates the options object for the CKBox Image Editor dialog.
49
57
  */
50
- private _prepareOptions;
58
+ private _prepareOptionsAbortable;
51
59
  /**
52
60
  * Initializes event lister for an event of removing an image.
53
61
  */
@@ -56,6 +64,7 @@ export default class CKBoxImageEditCommand extends Command {
56
64
  * Gets processing states of images that have been deleted in the mean time.
57
65
  */
58
66
  private _getProcessingStatesOfDeletedImages;
67
+ private _checkIfElementIsBeingProcessed;
59
68
  /**
60
69
  * Closes the CKBox Image Editor dialog.
61
70
  */