@ckeditor/ckeditor5-media-embed 44.3.0-alpha.7 → 45.0.0-alpha.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.
Files changed (307) hide show
  1. package/build/media-embed.js +2 -2
  2. package/build/translations/af.js +1 -1
  3. package/build/translations/ar.js +1 -1
  4. package/build/translations/ast.js +1 -1
  5. package/build/translations/az.js +1 -1
  6. package/build/translations/be.js +1 -0
  7. package/build/translations/bg.js +1 -1
  8. package/build/translations/bn.js +1 -1
  9. package/build/translations/bs.js +1 -1
  10. package/build/translations/ca.js +1 -1
  11. package/build/translations/cs.js +1 -1
  12. package/build/translations/da.js +1 -1
  13. package/build/translations/de-ch.js +1 -1
  14. package/build/translations/de.js +1 -1
  15. package/build/translations/el.js +1 -1
  16. package/build/translations/en-au.js +1 -1
  17. package/build/translations/en-gb.js +1 -1
  18. package/build/translations/eo.js +1 -1
  19. package/build/translations/es-co.js +1 -1
  20. package/build/translations/es.js +1 -1
  21. package/build/translations/et.js +1 -1
  22. package/build/translations/eu.js +1 -1
  23. package/build/translations/fa.js +1 -1
  24. package/build/translations/fi.js +1 -1
  25. package/build/translations/fr.js +1 -1
  26. package/build/translations/gl.js +1 -1
  27. package/build/translations/gu.js +1 -1
  28. package/build/translations/he.js +1 -1
  29. package/build/translations/hi.js +1 -1
  30. package/build/translations/hr.js +1 -1
  31. package/build/translations/hu.js +1 -1
  32. package/build/translations/hy.js +1 -1
  33. package/build/translations/id.js +1 -1
  34. package/build/translations/it.js +1 -1
  35. package/build/translations/ja.js +1 -1
  36. package/build/translations/jv.js +1 -1
  37. package/build/translations/kk.js +1 -1
  38. package/build/translations/km.js +1 -1
  39. package/build/translations/kn.js +1 -1
  40. package/build/translations/ko.js +1 -1
  41. package/build/translations/ku.js +1 -1
  42. package/build/translations/lt.js +1 -1
  43. package/build/translations/lv.js +1 -1
  44. package/build/translations/ms.js +1 -1
  45. package/build/translations/nb.js +1 -1
  46. package/build/translations/ne.js +1 -1
  47. package/build/translations/nl.js +1 -1
  48. package/build/translations/no.js +1 -1
  49. package/build/translations/oc.js +1 -1
  50. package/build/translations/pl.js +1 -1
  51. package/build/translations/pt-br.js +1 -1
  52. package/build/translations/pt.js +1 -1
  53. package/build/translations/ro.js +1 -1
  54. package/build/translations/ru.js +1 -1
  55. package/build/translations/si.js +1 -1
  56. package/build/translations/sk.js +1 -1
  57. package/build/translations/sl.js +1 -1
  58. package/build/translations/sq.js +1 -1
  59. package/build/translations/sr-latn.js +1 -1
  60. package/build/translations/sr.js +1 -1
  61. package/build/translations/sv.js +1 -1
  62. package/build/translations/th.js +1 -1
  63. package/build/translations/ti.js +1 -1
  64. package/build/translations/tk.js +1 -1
  65. package/build/translations/tr.js +1 -1
  66. package/build/translations/tt.js +1 -1
  67. package/build/translations/ug.js +1 -1
  68. package/build/translations/uk.js +1 -1
  69. package/build/translations/ur.js +1 -1
  70. package/build/translations/uz.js +1 -1
  71. package/build/translations/vi.js +1 -1
  72. package/build/translations/zh-cn.js +1 -1
  73. package/build/translations/zh.js +1 -1
  74. package/ckeditor5-metadata.json +1 -1
  75. package/dist/index.js +6 -8
  76. package/dist/index.js.map +1 -1
  77. package/dist/translations/af.js +1 -1
  78. package/dist/translations/af.umd.js +1 -1
  79. package/dist/translations/ar.js +1 -1
  80. package/dist/translations/ar.umd.js +1 -1
  81. package/dist/translations/ast.js +1 -1
  82. package/dist/translations/ast.umd.js +1 -1
  83. package/dist/translations/az.js +1 -1
  84. package/dist/translations/az.umd.js +1 -1
  85. package/dist/translations/be.d.ts +8 -0
  86. package/dist/translations/be.js +5 -0
  87. package/dist/translations/be.umd.js +11 -0
  88. package/dist/translations/bg.js +1 -1
  89. package/dist/translations/bg.umd.js +1 -1
  90. package/dist/translations/bn.js +1 -1
  91. package/dist/translations/bn.umd.js +1 -1
  92. package/dist/translations/bs.js +1 -1
  93. package/dist/translations/bs.umd.js +1 -1
  94. package/dist/translations/ca.js +1 -1
  95. package/dist/translations/ca.umd.js +1 -1
  96. package/dist/translations/cs.js +1 -1
  97. package/dist/translations/cs.umd.js +1 -1
  98. package/dist/translations/da.js +1 -1
  99. package/dist/translations/da.umd.js +1 -1
  100. package/dist/translations/de-ch.js +1 -1
  101. package/dist/translations/de-ch.umd.js +1 -1
  102. package/dist/translations/de.js +1 -1
  103. package/dist/translations/de.umd.js +1 -1
  104. package/dist/translations/el.js +1 -1
  105. package/dist/translations/el.umd.js +1 -1
  106. package/dist/translations/en-au.js +1 -1
  107. package/dist/translations/en-au.umd.js +1 -1
  108. package/dist/translations/en-gb.js +1 -1
  109. package/dist/translations/en-gb.umd.js +1 -1
  110. package/dist/translations/en.js +1 -1
  111. package/dist/translations/en.umd.js +1 -1
  112. package/dist/translations/eo.js +1 -1
  113. package/dist/translations/eo.umd.js +1 -1
  114. package/dist/translations/es-co.js +1 -1
  115. package/dist/translations/es-co.umd.js +1 -1
  116. package/dist/translations/es.js +1 -1
  117. package/dist/translations/es.umd.js +1 -1
  118. package/dist/translations/et.js +1 -1
  119. package/dist/translations/et.umd.js +1 -1
  120. package/dist/translations/eu.js +1 -1
  121. package/dist/translations/eu.umd.js +1 -1
  122. package/dist/translations/fa.js +1 -1
  123. package/dist/translations/fa.umd.js +1 -1
  124. package/dist/translations/fi.js +1 -1
  125. package/dist/translations/fi.umd.js +1 -1
  126. package/dist/translations/fr.js +1 -1
  127. package/dist/translations/fr.umd.js +1 -1
  128. package/dist/translations/gl.js +1 -1
  129. package/dist/translations/gl.umd.js +1 -1
  130. package/dist/translations/gu.js +1 -1
  131. package/dist/translations/gu.umd.js +1 -1
  132. package/dist/translations/he.js +1 -1
  133. package/dist/translations/he.umd.js +1 -1
  134. package/dist/translations/hi.js +1 -1
  135. package/dist/translations/hi.umd.js +1 -1
  136. package/dist/translations/hr.js +1 -1
  137. package/dist/translations/hr.umd.js +1 -1
  138. package/dist/translations/hu.js +1 -1
  139. package/dist/translations/hu.umd.js +1 -1
  140. package/dist/translations/hy.js +1 -1
  141. package/dist/translations/hy.umd.js +1 -1
  142. package/dist/translations/id.js +1 -1
  143. package/dist/translations/id.umd.js +1 -1
  144. package/dist/translations/it.js +1 -1
  145. package/dist/translations/it.umd.js +1 -1
  146. package/dist/translations/ja.js +1 -1
  147. package/dist/translations/ja.umd.js +1 -1
  148. package/dist/translations/jv.js +1 -1
  149. package/dist/translations/jv.umd.js +1 -1
  150. package/dist/translations/kk.js +1 -1
  151. package/dist/translations/kk.umd.js +1 -1
  152. package/dist/translations/km.js +1 -1
  153. package/dist/translations/km.umd.js +1 -1
  154. package/dist/translations/kn.js +1 -1
  155. package/dist/translations/kn.umd.js +1 -1
  156. package/dist/translations/ko.js +1 -1
  157. package/dist/translations/ko.umd.js +1 -1
  158. package/dist/translations/ku.js +1 -1
  159. package/dist/translations/ku.umd.js +1 -1
  160. package/dist/translations/lt.js +1 -1
  161. package/dist/translations/lt.umd.js +1 -1
  162. package/dist/translations/lv.js +1 -1
  163. package/dist/translations/lv.umd.js +1 -1
  164. package/dist/translations/ms.js +1 -1
  165. package/dist/translations/ms.umd.js +1 -1
  166. package/dist/translations/nb.js +1 -1
  167. package/dist/translations/nb.umd.js +1 -1
  168. package/dist/translations/ne.js +1 -1
  169. package/dist/translations/ne.umd.js +1 -1
  170. package/dist/translations/nl.js +1 -1
  171. package/dist/translations/nl.umd.js +1 -1
  172. package/dist/translations/no.js +1 -1
  173. package/dist/translations/no.umd.js +1 -1
  174. package/dist/translations/oc.js +1 -1
  175. package/dist/translations/oc.umd.js +1 -1
  176. package/dist/translations/pl.js +1 -1
  177. package/dist/translations/pl.umd.js +1 -1
  178. package/dist/translations/pt-br.js +1 -1
  179. package/dist/translations/pt-br.umd.js +1 -1
  180. package/dist/translations/pt.js +1 -1
  181. package/dist/translations/pt.umd.js +1 -1
  182. package/dist/translations/ro.js +1 -1
  183. package/dist/translations/ro.umd.js +1 -1
  184. package/dist/translations/ru.js +1 -1
  185. package/dist/translations/ru.umd.js +1 -1
  186. package/dist/translations/si.js +1 -1
  187. package/dist/translations/si.umd.js +1 -1
  188. package/dist/translations/sk.js +1 -1
  189. package/dist/translations/sk.umd.js +1 -1
  190. package/dist/translations/sl.js +1 -1
  191. package/dist/translations/sl.umd.js +1 -1
  192. package/dist/translations/sq.js +1 -1
  193. package/dist/translations/sq.umd.js +1 -1
  194. package/dist/translations/sr-latn.js +1 -1
  195. package/dist/translations/sr-latn.umd.js +1 -1
  196. package/dist/translations/sr.js +1 -1
  197. package/dist/translations/sr.umd.js +1 -1
  198. package/dist/translations/sv.js +1 -1
  199. package/dist/translations/sv.umd.js +1 -1
  200. package/dist/translations/th.js +1 -1
  201. package/dist/translations/th.umd.js +1 -1
  202. package/dist/translations/ti.js +1 -1
  203. package/dist/translations/ti.umd.js +1 -1
  204. package/dist/translations/tk.js +1 -1
  205. package/dist/translations/tk.umd.js +1 -1
  206. package/dist/translations/tr.js +1 -1
  207. package/dist/translations/tr.umd.js +1 -1
  208. package/dist/translations/tt.js +1 -1
  209. package/dist/translations/tt.umd.js +1 -1
  210. package/dist/translations/ug.js +1 -1
  211. package/dist/translations/ug.umd.js +1 -1
  212. package/dist/translations/uk.js +1 -1
  213. package/dist/translations/uk.umd.js +1 -1
  214. package/dist/translations/ur.js +1 -1
  215. package/dist/translations/ur.umd.js +1 -1
  216. package/dist/translations/uz.js +1 -1
  217. package/dist/translations/uz.umd.js +1 -1
  218. package/dist/translations/vi.js +1 -1
  219. package/dist/translations/vi.umd.js +1 -1
  220. package/dist/translations/zh-cn.js +1 -1
  221. package/dist/translations/zh-cn.umd.js +1 -1
  222. package/dist/translations/zh.js +1 -1
  223. package/dist/translations/zh.umd.js +1 -1
  224. package/lang/contexts.json +1 -0
  225. package/lang/translations/af.po +4 -0
  226. package/lang/translations/ar.po +4 -0
  227. package/lang/translations/ast.po +4 -0
  228. package/lang/translations/az.po +4 -0
  229. package/lang/translations/be.po +56 -0
  230. package/lang/translations/bg.po +4 -0
  231. package/lang/translations/bn.po +4 -0
  232. package/lang/translations/bs.po +4 -0
  233. package/lang/translations/ca.po +4 -0
  234. package/lang/translations/cs.po +4 -0
  235. package/lang/translations/da.po +4 -0
  236. package/lang/translations/de-ch.po +4 -0
  237. package/lang/translations/de.po +4 -0
  238. package/lang/translations/el.po +4 -0
  239. package/lang/translations/en-au.po +4 -0
  240. package/lang/translations/en-gb.po +4 -0
  241. package/lang/translations/en.po +4 -0
  242. package/lang/translations/eo.po +4 -0
  243. package/lang/translations/es-co.po +4 -0
  244. package/lang/translations/es.po +4 -0
  245. package/lang/translations/et.po +4 -0
  246. package/lang/translations/eu.po +4 -0
  247. package/lang/translations/fa.po +4 -0
  248. package/lang/translations/fi.po +4 -0
  249. package/lang/translations/fr.po +4 -0
  250. package/lang/translations/gl.po +4 -0
  251. package/lang/translations/gu.po +4 -0
  252. package/lang/translations/he.po +4 -0
  253. package/lang/translations/hi.po +4 -0
  254. package/lang/translations/hr.po +4 -0
  255. package/lang/translations/hu.po +4 -0
  256. package/lang/translations/hy.po +4 -0
  257. package/lang/translations/id.po +4 -0
  258. package/lang/translations/it.po +4 -0
  259. package/lang/translations/ja.po +4 -0
  260. package/lang/translations/jv.po +4 -0
  261. package/lang/translations/kk.po +4 -0
  262. package/lang/translations/km.po +4 -0
  263. package/lang/translations/kn.po +4 -0
  264. package/lang/translations/ko.po +4 -0
  265. package/lang/translations/ku.po +4 -0
  266. package/lang/translations/lt.po +4 -0
  267. package/lang/translations/lv.po +4 -0
  268. package/lang/translations/ms.po +4 -0
  269. package/lang/translations/nb.po +4 -0
  270. package/lang/translations/ne.po +4 -0
  271. package/lang/translations/nl.po +4 -0
  272. package/lang/translations/no.po +4 -0
  273. package/lang/translations/oc.po +4 -0
  274. package/lang/translations/pl.po +4 -0
  275. package/lang/translations/pt-br.po +4 -0
  276. package/lang/translations/pt.po +4 -0
  277. package/lang/translations/ro.po +4 -0
  278. package/lang/translations/ru.po +4 -0
  279. package/lang/translations/si.po +4 -0
  280. package/lang/translations/sk.po +4 -0
  281. package/lang/translations/sl.po +4 -0
  282. package/lang/translations/sq.po +4 -0
  283. package/lang/translations/sr-latn.po +4 -0
  284. package/lang/translations/sr.po +4 -0
  285. package/lang/translations/sv.po +4 -0
  286. package/lang/translations/th.po +4 -0
  287. package/lang/translations/ti.po +4 -0
  288. package/lang/translations/tk.po +4 -0
  289. package/lang/translations/tr.po +4 -0
  290. package/lang/translations/tt.po +4 -0
  291. package/lang/translations/ug.po +4 -0
  292. package/lang/translations/uk.po +4 -0
  293. package/lang/translations/ur.po +4 -0
  294. package/lang/translations/uz.po +4 -0
  295. package/lang/translations/vi.po +4 -0
  296. package/lang/translations/zh-cn.po +4 -0
  297. package/lang/translations/zh.po +4 -0
  298. package/package.json +11 -10
  299. package/src/automediaembed.js +10 -0
  300. package/src/mediaembedediting.js +4 -0
  301. package/src/mediaembedui.js +6 -4
  302. package/src/mediaregistry.d.ts +1 -4
  303. package/src/mediaregistry.js +32 -2
  304. package/src/ui/mediaformview.js +25 -0
  305. package/theme/icons/media/twitter.svg +0 -20
  306. package/theme/icons/media-placeholder.svg +0 -1
  307. package/theme/icons/media.svg +0 -1
@@ -50,3 +50,7 @@ msgstr "Mediýa gurallar paneli"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr ""
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "Medya araç çubuğu"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr "Medyayı yeni sekmede aç"
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr ""
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr ""
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr ""
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr ""
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "Панель інструментів медіа"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr "Відкрити медіа у новій вкладці"
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "آلہ جات برائے میڈیا"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr ""
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "Media asboblar paneli"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr ""
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "Thanh công cụ đa phương tiện"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr "Mở nội dung nghe nhìn trong tab mới"
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "媒体工具栏"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr "在新标签页打开媒体"
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
@@ -50,3 +50,7 @@ msgstr "影音工具"
50
50
  msgctxt "A tooltip displayed when the user hovers a non-previewable media URL in the editor content."
51
51
  msgid "Open media in new tab"
52
52
  msgstr "在新分頁打開媒體"
53
+
54
+ msgctxt "The label for the Media Embed balloon."
55
+ msgid "Media embed"
56
+ msgstr ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-media-embed",
3
- "version": "44.3.0-alpha.7",
3
+ "version": "45.0.0-alpha.0",
4
4
  "description": "Media embed feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,15 +13,16 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-clipboard": "44.3.0-alpha.7",
17
- "@ckeditor/ckeditor5-core": "44.3.0-alpha.7",
18
- "@ckeditor/ckeditor5-engine": "44.3.0-alpha.7",
19
- "@ckeditor/ckeditor5-typing": "44.3.0-alpha.7",
20
- "@ckeditor/ckeditor5-ui": "44.3.0-alpha.7",
21
- "@ckeditor/ckeditor5-undo": "44.3.0-alpha.7",
22
- "@ckeditor/ckeditor5-utils": "44.3.0-alpha.7",
23
- "@ckeditor/ckeditor5-widget": "44.3.0-alpha.7",
24
- "ckeditor5": "44.3.0-alpha.7"
16
+ "@ckeditor/ckeditor5-clipboard": "45.0.0-alpha.0",
17
+ "@ckeditor/ckeditor5-core": "45.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-engine": "45.0.0-alpha.0",
19
+ "@ckeditor/ckeditor5-icons": "45.0.0-alpha.0",
20
+ "@ckeditor/ckeditor5-typing": "45.0.0-alpha.0",
21
+ "@ckeditor/ckeditor5-ui": "45.0.0-alpha.0",
22
+ "@ckeditor/ckeditor5-undo": "45.0.0-alpha.0",
23
+ "@ckeditor/ckeditor5-utils": "45.0.0-alpha.0",
24
+ "@ckeditor/ckeditor5-widget": "45.0.0-alpha.0",
25
+ "ckeditor5": "45.0.0-alpha.0"
25
26
  },
26
27
  "author": "CKSource (http://cksource.com/)",
27
28
  "license": "SEE LICENSE IN LICENSE.md",
@@ -37,6 +37,16 @@ export default class AutoMediaEmbed extends Plugin {
37
37
  static get isOfficialPlugin() {
38
38
  return true;
39
39
  }
40
+ /**
41
+ * The paste–to–embed `setTimeout` ID. Stored as a property to allow
42
+ * cleaning of the timeout.
43
+ */
44
+ _timeoutId;
45
+ /**
46
+ * The position where the `<media>` element will be inserted after the timeout,
47
+ * determined each time the new content is pasted into the document.
48
+ */
49
+ _positionToInsert;
40
50
  /**
41
51
  * @inheritDoc
42
52
  */
@@ -28,6 +28,10 @@ export default class MediaEmbedEditing extends Plugin {
28
28
  static get isOfficialPlugin() {
29
29
  return true;
30
30
  }
31
+ /**
32
+ * The media registry managing the media providers in the editor.
33
+ */
34
+ registry;
31
35
  /**
32
36
  * @inheritDoc
33
37
  */
@@ -6,10 +6,10 @@
6
6
  * @module media-embed/mediaembedui
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { IconMedia } from 'ckeditor5/src/icons.js';
9
10
  import { ButtonView, CssTransitionDisablerMixin, MenuBarMenuListItemButtonView, Dialog } from 'ckeditor5/src/ui.js';
10
11
  import MediaFormView from './ui/mediaformview.js';
11
12
  import MediaEmbedEditing from './mediaembedediting.js';
12
- import mediaIcon from '../theme/icons/media.svg';
13
13
  /**
14
14
  * The media embed UI plugin.
15
15
  */
@@ -32,6 +32,7 @@ export default class MediaEmbedUI extends Plugin {
32
32
  static get isOfficialPlugin() {
33
33
  return true;
34
34
  }
35
+ _formView;
35
36
  /**
36
37
  * @inheritDoc
37
38
  */
@@ -59,7 +60,7 @@ export default class MediaEmbedUI extends Plugin {
59
60
  const buttonView = new ButtonClass(editor.locale);
60
61
  const command = editor.commands.get('mediaEmbed');
61
62
  const dialogPlugin = this.editor.plugins.get('Dialog');
62
- buttonView.icon = mediaIcon;
63
+ buttonView.icon = IconMedia;
63
64
  buttonView.bind('isEnabled').to(command, 'isEnabled');
64
65
  buttonView.on('execute', () => {
65
66
  if (dialogPlugin.id === 'mediaEmbed') {
@@ -76,6 +77,7 @@ export default class MediaEmbedUI extends Plugin {
76
77
  const dialog = editor.plugins.get('Dialog');
77
78
  const command = editor.commands.get('mediaEmbed');
78
79
  const t = editor.locale.t;
80
+ const isMediaSelected = command.value !== undefined;
79
81
  if (!this._formView) {
80
82
  const registry = editor.plugins.get(MediaEmbedEditing).registry;
81
83
  this._formView = new (CssTransitionDisablerMixin(MediaFormView))(getFormValidators(editor.t, registry), editor.locale);
@@ -83,7 +85,7 @@ export default class MediaEmbedUI extends Plugin {
83
85
  }
84
86
  dialog.show({
85
87
  id: 'mediaEmbed',
86
- title: t('Insert media'),
88
+ title: t('Media embed'),
87
89
  content: this._formView,
88
90
  isModal: true,
89
91
  onShow: () => {
@@ -98,7 +100,7 @@ export default class MediaEmbedUI extends Plugin {
98
100
  onExecute: () => dialog.hide()
99
101
  },
100
102
  {
101
- label: t('Accept'),
103
+ label: isMediaSelected ? t('Save') : t('Insert'),
102
104
  class: 'ck-button-action',
103
105
  withText: true,
104
106
  onExecute: () => this._handleSubmitForm()
@@ -2,11 +2,8 @@
2
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
- /**
6
- * @module media-embed/mediaregistry
7
- */
8
- import type { DowncastWriter, ViewElement } from 'ckeditor5/src/engine.js';
9
5
  import { type Locale } from 'ckeditor5/src/utils.js';
6
+ import type { DowncastWriter, ViewElement } from 'ckeditor5/src/engine.js';
10
7
  import type { MediaEmbedConfig, MediaEmbedProvider } from './mediaembedconfig.js';
11
8
  import type { MediaOptions } from './utils.js';
12
9
  /**
@@ -2,9 +2,12 @@
2
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
+ /**
6
+ * @module media-embed/mediaregistry
7
+ */
5
8
  import { IconView, Template } from 'ckeditor5/src/ui.js';
9
+ import { IconMediaPlaceholder } from 'ckeditor5/src/icons.js';
6
10
  import { logWarning, toArray } from 'ckeditor5/src/utils.js';
7
- import mediaPlaceholderIcon from '../theme/icons/media-placeholder.svg';
8
11
  const mediaPlaceholderIconViewBox = '0 0 64 42';
9
12
  /**
10
13
  * A bridge between the raw media content provider definitions and the editor view content.
@@ -14,6 +17,15 @@ const mediaPlaceholderIconViewBox = '0 0 64 42';
14
17
  * Mostly used by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} plugin.
15
18
  */
16
19
  export default class MediaRegistry {
20
+ /**
21
+ * The {@link module:utils/locale~Locale} instance.
22
+ */
23
+ locale;
24
+ /**
25
+ * The media provider definitions available for the registry. Usually corresponding with the
26
+ * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig media configuration}.
27
+ */
28
+ providerDefinitions;
17
29
  /**
18
30
  * Creates an instance of the {@link module:media-embed/mediaregistry~MediaRegistry} class.
19
31
  *
@@ -120,6 +132,24 @@ export default class MediaRegistry {
120
132
  * It can be rendered to the {@link module:engine/view/element~Element view element} and used in the editing or data pipeline.
121
133
  */
122
134
  class Media {
135
+ /**
136
+ * The URL this Media instance represents.
137
+ */
138
+ url;
139
+ /**
140
+ * Shorthand for {@link module:utils/locale~Locale#t}.
141
+ *
142
+ * @see module:utils/locale~Locale#t
143
+ */
144
+ _locale;
145
+ /**
146
+ * The output of the `RegExp.match` which validated the {@link #url} of this media.
147
+ */
148
+ _match;
149
+ /**
150
+ * The function returning the HTML string preview of this media.
151
+ */
152
+ _previewRenderer;
123
153
  constructor(locale, url, match, previewRenderer) {
124
154
  this.url = this._getValidUrl(url);
125
155
  this._locale = locale;
@@ -177,7 +207,7 @@ class Media {
177
207
  _getPlaceholderHtml() {
178
208
  const icon = new IconView();
179
209
  const t = this._locale.t;
180
- icon.content = mediaPlaceholderIcon;
210
+ icon.content = IconMediaPlaceholder;
181
211
  icon.viewBox = mediaPlaceholderIconViewBox;
182
212
  const placeholder = new Template({
183
213
  tag: 'div',
@@ -17,6 +17,31 @@ import '../../theme/mediaform.css';
17
17
  * See {@link module:media-embed/ui/mediaformview~MediaFormView}.
18
18
  */
19
19
  export default class MediaFormView extends View {
20
+ /**
21
+ * Tracks information about the DOM focus in the form.
22
+ */
23
+ focusTracker;
24
+ /**
25
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
26
+ */
27
+ keystrokes;
28
+ /**
29
+ * The URL input view.
30
+ */
31
+ urlInputView;
32
+ /**
33
+ * An array of form validators used by {@link #isValid}.
34
+ */
35
+ _validators;
36
+ /**
37
+ * The default info text for the {@link #urlInputView}.
38
+ */
39
+ _urlInputViewInfoDefault;
40
+ /**
41
+ * The info text with an additional tip for the {@link #urlInputView},
42
+ * displayed when the input has some value.
43
+ */
44
+ _urlInputViewInfoTip;
20
45
  /**
21
46
  * @param validators Form validators used by {@link #isValid}.
22
47
  * @param locale The localization services instance.
@@ -1,20 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 20.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
- viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve">
5
- <style type="text/css">
6
- .st0{fill:#1DA1F2;}
7
- .st1{fill:#FFFFFF;}
8
- </style>
9
- <g id="Dark_Blue">
10
- <circle class="st0" cx="200" cy="200" r="200"/>
11
- </g>
12
- <g id="Logo__x2014__FIXED">
13
- <path class="st1" d="M163.4,305.5c88.7,0,137.2-73.5,137.2-137.2c0-2.1,0-4.2-0.1-6.2c9.4-6.8,17.6-15.3,24.1-25
14
- c-8.6,3.8-17.9,6.4-27.7,7.6c10-6,17.6-15.4,21.2-26.7c-9.3,5.5-19.6,9.5-30.6,11.7c-8.8-9.4-21.3-15.2-35.2-15.2
15
- c-26.6,0-48.2,21.6-48.2,48.2c0,3.8,0.4,7.5,1.3,11c-40.1-2-75.6-21.2-99.4-50.4c-4.1,7.1-6.5,15.4-6.5,24.2
16
- c0,16.7,8.5,31.5,21.5,40.1c-7.9-0.2-15.3-2.4-21.8-6c0,0.2,0,0.4,0,0.6c0,23.4,16.6,42.8,38.7,47.3c-4,1.1-8.3,1.7-12.7,1.7
17
- c-3.1,0-6.1-0.3-9.1-0.9c6.1,19.2,23.9,33.1,45,33.5c-16.5,12.9-37.3,20.6-59.9,20.6c-3.9,0-7.7-0.2-11.5-0.7
18
- C110.8,297.5,136.2,305.5,163.4,305.5"/>
19
- </g>
20
- </svg>
@@ -1 +0,0 @@
1
- <svg viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z"/></svg>
@@ -1 +0,0 @@
1
- <svg viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-14.24 1h13.008v12H4.467l.029-12Zm-2.208 1h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003l-.029 1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h.974v1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Z"/><path d="M8.374 6.648a.399.399 0 0 1 .395-.4.402.402 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35V6.648Z"/></svg>