@ckeditor/ckeditor5-template 44.1.0 → 44.2.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 (402) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/build/template.js +3 -3
  4. package/build/translations/af.js +1 -1
  5. package/build/translations/ar.js +1 -1
  6. package/build/translations/ast.js +1 -1
  7. package/build/translations/az.js +1 -1
  8. package/build/translations/bg.js +1 -1
  9. package/build/translations/bn.js +1 -1
  10. package/build/translations/bs.js +1 -1
  11. package/build/translations/ca.js +1 -1
  12. package/build/translations/cs.js +1 -1
  13. package/build/translations/da.js +1 -1
  14. package/build/translations/de-ch.js +1 -1
  15. package/build/translations/de.js +1 -1
  16. package/build/translations/el.js +1 -1
  17. package/build/translations/en-au.js +1 -1
  18. package/build/translations/en-gb.js +1 -1
  19. package/build/translations/eo.js +1 -1
  20. package/build/translations/es-co.js +1 -1
  21. package/build/translations/es.js +1 -1
  22. package/build/translations/et.js +1 -1
  23. package/build/translations/eu.js +1 -1
  24. package/build/translations/fa.js +1 -1
  25. package/build/translations/fi.js +1 -1
  26. package/build/translations/fr.js +1 -1
  27. package/build/translations/gl.js +1 -1
  28. package/build/translations/gu.js +1 -1
  29. package/build/translations/he.js +1 -1
  30. package/build/translations/hi.js +1 -1
  31. package/build/translations/hr.js +1 -1
  32. package/build/translations/hu.js +1 -1
  33. package/build/translations/hy.js +1 -1
  34. package/build/translations/id.js +1 -1
  35. package/build/translations/it.js +1 -1
  36. package/build/translations/ja.js +1 -1
  37. package/build/translations/jv.js +1 -1
  38. package/build/translations/kk.js +1 -1
  39. package/build/translations/km.js +1 -1
  40. package/build/translations/kn.js +1 -1
  41. package/build/translations/ko.js +1 -1
  42. package/build/translations/ku.js +1 -1
  43. package/build/translations/lt.js +1 -1
  44. package/build/translations/lv.js +1 -1
  45. package/build/translations/ms.js +1 -1
  46. package/build/translations/nb.js +1 -1
  47. package/build/translations/ne.js +1 -1
  48. package/build/translations/nl.js +1 -1
  49. package/build/translations/no.js +1 -1
  50. package/build/translations/oc.js +1 -1
  51. package/build/translations/pl.js +1 -1
  52. package/build/translations/pt-br.js +1 -1
  53. package/build/translations/pt.js +1 -1
  54. package/build/translations/ro.js +1 -1
  55. package/build/translations/ru.js +1 -1
  56. package/build/translations/si.js +1 -1
  57. package/build/translations/sk.js +1 -1
  58. package/build/translations/sl.js +1 -1
  59. package/build/translations/sq.js +1 -1
  60. package/build/translations/sr-latn.js +1 -1
  61. package/build/translations/sr.js +1 -1
  62. package/build/translations/sv.js +1 -1
  63. package/build/translations/th.js +1 -1
  64. package/build/translations/ti.js +1 -1
  65. package/build/translations/tk.js +1 -1
  66. package/build/translations/tr.js +1 -1
  67. package/build/translations/tt.js +1 -1
  68. package/build/translations/ug.js +1 -1
  69. package/build/translations/uk.js +1 -1
  70. package/build/translations/ur.js +1 -1
  71. package/build/translations/uz.js +1 -1
  72. package/build/translations/vi.js +1 -1
  73. package/build/translations/zh-cn.js +1 -1
  74. package/build/translations/zh.js +1 -1
  75. package/dist/index-content.css +2 -2
  76. package/dist/index-editor.css +2 -2
  77. package/dist/index.css +4 -4
  78. package/dist/index.js +2 -2
  79. package/dist/translations/af.d.ts +2 -2
  80. package/dist/translations/af.js +2 -2
  81. package/dist/translations/af.umd.js +2 -2
  82. package/dist/translations/ar.d.ts +2 -2
  83. package/dist/translations/ar.js +2 -2
  84. package/dist/translations/ar.umd.js +2 -2
  85. package/dist/translations/ast.d.ts +2 -2
  86. package/dist/translations/ast.js +2 -2
  87. package/dist/translations/ast.umd.js +2 -2
  88. package/dist/translations/az.d.ts +2 -2
  89. package/dist/translations/az.js +2 -2
  90. package/dist/translations/az.umd.js +2 -2
  91. package/dist/translations/bg.d.ts +2 -2
  92. package/dist/translations/bg.js +2 -2
  93. package/dist/translations/bg.umd.js +2 -2
  94. package/dist/translations/bn.d.ts +2 -2
  95. package/dist/translations/bn.js +2 -2
  96. package/dist/translations/bn.umd.js +2 -2
  97. package/dist/translations/bs.d.ts +2 -2
  98. package/dist/translations/bs.js +2 -2
  99. package/dist/translations/bs.umd.js +2 -2
  100. package/dist/translations/ca.d.ts +2 -2
  101. package/dist/translations/ca.js +2 -2
  102. package/dist/translations/ca.umd.js +2 -2
  103. package/dist/translations/cs.d.ts +2 -2
  104. package/dist/translations/cs.js +2 -2
  105. package/dist/translations/cs.umd.js +2 -2
  106. package/dist/translations/da.d.ts +2 -2
  107. package/dist/translations/da.js +2 -2
  108. package/dist/translations/da.umd.js +2 -2
  109. package/dist/translations/de-ch.d.ts +2 -2
  110. package/dist/translations/de-ch.js +2 -2
  111. package/dist/translations/de-ch.umd.js +2 -2
  112. package/dist/translations/de.d.ts +2 -2
  113. package/dist/translations/de.js +2 -2
  114. package/dist/translations/de.umd.js +2 -2
  115. package/dist/translations/el.d.ts +2 -2
  116. package/dist/translations/el.js +2 -2
  117. package/dist/translations/el.umd.js +2 -2
  118. package/dist/translations/en-au.d.ts +2 -2
  119. package/dist/translations/en-au.js +2 -2
  120. package/dist/translations/en-au.umd.js +2 -2
  121. package/dist/translations/en-gb.d.ts +2 -2
  122. package/dist/translations/en-gb.js +2 -2
  123. package/dist/translations/en-gb.umd.js +2 -2
  124. package/dist/translations/en.d.ts +2 -2
  125. package/dist/translations/en.js +2 -2
  126. package/dist/translations/en.umd.js +2 -2
  127. package/dist/translations/eo.d.ts +2 -2
  128. package/dist/translations/eo.js +2 -2
  129. package/dist/translations/eo.umd.js +2 -2
  130. package/dist/translations/es-co.d.ts +2 -2
  131. package/dist/translations/es-co.js +2 -2
  132. package/dist/translations/es-co.umd.js +2 -2
  133. package/dist/translations/es.d.ts +2 -2
  134. package/dist/translations/es.js +2 -2
  135. package/dist/translations/es.umd.js +2 -2
  136. package/dist/translations/et.d.ts +2 -2
  137. package/dist/translations/et.js +2 -2
  138. package/dist/translations/et.umd.js +2 -2
  139. package/dist/translations/eu.d.ts +2 -2
  140. package/dist/translations/eu.js +2 -2
  141. package/dist/translations/eu.umd.js +2 -2
  142. package/dist/translations/fa.d.ts +2 -2
  143. package/dist/translations/fa.js +2 -2
  144. package/dist/translations/fa.umd.js +2 -2
  145. package/dist/translations/fi.d.ts +2 -2
  146. package/dist/translations/fi.js +2 -2
  147. package/dist/translations/fi.umd.js +2 -2
  148. package/dist/translations/fr.d.ts +2 -2
  149. package/dist/translations/fr.js +2 -2
  150. package/dist/translations/fr.umd.js +2 -2
  151. package/dist/translations/gl.d.ts +2 -2
  152. package/dist/translations/gl.js +2 -2
  153. package/dist/translations/gl.umd.js +2 -2
  154. package/dist/translations/gu.d.ts +2 -2
  155. package/dist/translations/gu.js +2 -2
  156. package/dist/translations/gu.umd.js +2 -2
  157. package/dist/translations/he.d.ts +2 -2
  158. package/dist/translations/he.js +2 -2
  159. package/dist/translations/he.umd.js +2 -2
  160. package/dist/translations/hi.d.ts +2 -2
  161. package/dist/translations/hi.js +2 -2
  162. package/dist/translations/hi.umd.js +2 -2
  163. package/dist/translations/hr.d.ts +2 -2
  164. package/dist/translations/hr.js +2 -2
  165. package/dist/translations/hr.umd.js +2 -2
  166. package/dist/translations/hu.d.ts +2 -2
  167. package/dist/translations/hu.js +2 -2
  168. package/dist/translations/hu.umd.js +2 -2
  169. package/dist/translations/hy.d.ts +2 -2
  170. package/dist/translations/hy.js +2 -2
  171. package/dist/translations/hy.umd.js +2 -2
  172. package/dist/translations/id.d.ts +2 -2
  173. package/dist/translations/id.js +2 -2
  174. package/dist/translations/id.umd.js +2 -2
  175. package/dist/translations/it.d.ts +2 -2
  176. package/dist/translations/it.js +2 -2
  177. package/dist/translations/it.umd.js +2 -2
  178. package/dist/translations/ja.d.ts +2 -2
  179. package/dist/translations/ja.js +2 -2
  180. package/dist/translations/ja.umd.js +2 -2
  181. package/dist/translations/jv.d.ts +2 -2
  182. package/dist/translations/jv.js +2 -2
  183. package/dist/translations/jv.umd.js +2 -2
  184. package/dist/translations/kk.d.ts +2 -2
  185. package/dist/translations/kk.js +2 -2
  186. package/dist/translations/kk.umd.js +2 -2
  187. package/dist/translations/km.d.ts +2 -2
  188. package/dist/translations/km.js +2 -2
  189. package/dist/translations/km.umd.js +2 -2
  190. package/dist/translations/kn.d.ts +2 -2
  191. package/dist/translations/kn.js +2 -2
  192. package/dist/translations/kn.umd.js +2 -2
  193. package/dist/translations/ko.d.ts +2 -2
  194. package/dist/translations/ko.js +2 -2
  195. package/dist/translations/ko.umd.js +2 -2
  196. package/dist/translations/ku.d.ts +2 -2
  197. package/dist/translations/ku.js +2 -2
  198. package/dist/translations/ku.umd.js +2 -2
  199. package/dist/translations/lt.d.ts +2 -2
  200. package/dist/translations/lt.js +2 -2
  201. package/dist/translations/lt.umd.js +2 -2
  202. package/dist/translations/lv.d.ts +2 -2
  203. package/dist/translations/lv.js +2 -2
  204. package/dist/translations/lv.umd.js +2 -2
  205. package/dist/translations/ms.d.ts +2 -2
  206. package/dist/translations/ms.js +2 -2
  207. package/dist/translations/ms.umd.js +2 -2
  208. package/dist/translations/nb.d.ts +2 -2
  209. package/dist/translations/nb.js +2 -2
  210. package/dist/translations/nb.umd.js +2 -2
  211. package/dist/translations/ne.d.ts +2 -2
  212. package/dist/translations/ne.js +2 -2
  213. package/dist/translations/ne.umd.js +2 -2
  214. package/dist/translations/nl.d.ts +2 -2
  215. package/dist/translations/nl.js +2 -2
  216. package/dist/translations/nl.umd.js +2 -2
  217. package/dist/translations/no.d.ts +2 -2
  218. package/dist/translations/no.js +2 -2
  219. package/dist/translations/no.umd.js +2 -2
  220. package/dist/translations/oc.d.ts +2 -2
  221. package/dist/translations/oc.js +2 -2
  222. package/dist/translations/oc.umd.js +2 -2
  223. package/dist/translations/pl.d.ts +2 -2
  224. package/dist/translations/pl.js +2 -2
  225. package/dist/translations/pl.umd.js +2 -2
  226. package/dist/translations/pt-br.d.ts +2 -2
  227. package/dist/translations/pt-br.js +2 -2
  228. package/dist/translations/pt-br.umd.js +2 -2
  229. package/dist/translations/pt.d.ts +2 -2
  230. package/dist/translations/pt.js +2 -2
  231. package/dist/translations/pt.umd.js +2 -2
  232. package/dist/translations/ro.d.ts +2 -2
  233. package/dist/translations/ro.js +2 -2
  234. package/dist/translations/ro.umd.js +2 -2
  235. package/dist/translations/ru.d.ts +2 -2
  236. package/dist/translations/ru.js +2 -2
  237. package/dist/translations/ru.umd.js +2 -2
  238. package/dist/translations/si.d.ts +2 -2
  239. package/dist/translations/si.js +2 -2
  240. package/dist/translations/si.umd.js +2 -2
  241. package/dist/translations/sk.d.ts +2 -2
  242. package/dist/translations/sk.js +2 -2
  243. package/dist/translations/sk.umd.js +2 -2
  244. package/dist/translations/sl.d.ts +2 -2
  245. package/dist/translations/sl.js +2 -2
  246. package/dist/translations/sl.umd.js +2 -2
  247. package/dist/translations/sq.d.ts +2 -2
  248. package/dist/translations/sq.js +2 -2
  249. package/dist/translations/sq.umd.js +2 -2
  250. package/dist/translations/sr-latn.d.ts +2 -2
  251. package/dist/translations/sr-latn.js +2 -2
  252. package/dist/translations/sr-latn.umd.js +2 -2
  253. package/dist/translations/sr.d.ts +2 -2
  254. package/dist/translations/sr.js +2 -2
  255. package/dist/translations/sr.umd.js +2 -2
  256. package/dist/translations/sv.d.ts +2 -2
  257. package/dist/translations/sv.js +2 -2
  258. package/dist/translations/sv.umd.js +2 -2
  259. package/dist/translations/th.d.ts +2 -2
  260. package/dist/translations/th.js +2 -2
  261. package/dist/translations/th.umd.js +2 -2
  262. package/dist/translations/ti.d.ts +2 -2
  263. package/dist/translations/ti.js +2 -2
  264. package/dist/translations/ti.umd.js +2 -2
  265. package/dist/translations/tk.d.ts +2 -2
  266. package/dist/translations/tk.js +2 -2
  267. package/dist/translations/tk.umd.js +2 -2
  268. package/dist/translations/tr.d.ts +2 -2
  269. package/dist/translations/tr.js +2 -2
  270. package/dist/translations/tr.umd.js +2 -2
  271. package/dist/translations/tt.d.ts +2 -2
  272. package/dist/translations/tt.js +2 -2
  273. package/dist/translations/tt.umd.js +2 -2
  274. package/dist/translations/ug.d.ts +2 -2
  275. package/dist/translations/ug.js +2 -2
  276. package/dist/translations/ug.umd.js +2 -2
  277. package/dist/translations/uk.d.ts +2 -2
  278. package/dist/translations/uk.js +2 -2
  279. package/dist/translations/uk.umd.js +2 -2
  280. package/dist/translations/ur.d.ts +2 -2
  281. package/dist/translations/ur.js +2 -2
  282. package/dist/translations/ur.umd.js +2 -2
  283. package/dist/translations/uz.d.ts +2 -2
  284. package/dist/translations/uz.js +2 -2
  285. package/dist/translations/uz.umd.js +2 -2
  286. package/dist/translations/vi.d.ts +2 -2
  287. package/dist/translations/vi.js +2 -2
  288. package/dist/translations/vi.umd.js +2 -2
  289. package/dist/translations/zh-cn.d.ts +2 -2
  290. package/dist/translations/zh-cn.js +2 -2
  291. package/dist/translations/zh-cn.umd.js +2 -2
  292. package/dist/translations/zh.d.ts +2 -2
  293. package/dist/translations/zh.js +2 -2
  294. package/dist/translations/zh.umd.js +2 -2
  295. package/lang/contexts.json +6 -7
  296. package/lang/translations/af.po +1 -5
  297. package/lang/translations/ar.po +1 -5
  298. package/lang/translations/ast.po +1 -5
  299. package/lang/translations/az.po +1 -5
  300. package/lang/translations/bg.po +1 -5
  301. package/lang/translations/bn.po +1 -5
  302. package/lang/translations/bs.po +1 -5
  303. package/lang/translations/ca.po +1 -5
  304. package/lang/translations/cs.po +1 -5
  305. package/lang/translations/da.po +1 -5
  306. package/lang/translations/de-ch.po +1 -5
  307. package/lang/translations/de.po +1 -5
  308. package/lang/translations/el.po +1 -5
  309. package/lang/translations/en-au.po +1 -5
  310. package/lang/translations/en-gb.po +1 -5
  311. package/lang/translations/en.po +1 -5
  312. package/lang/translations/eo.po +1 -5
  313. package/lang/translations/es-co.po +1 -5
  314. package/lang/translations/es.po +1 -5
  315. package/lang/translations/et.po +1 -5
  316. package/lang/translations/eu.po +1 -5
  317. package/lang/translations/fa.po +1 -5
  318. package/lang/translations/fi.po +1 -5
  319. package/lang/translations/fr.po +1 -5
  320. package/lang/translations/gl.po +1 -5
  321. package/lang/translations/gu.po +1 -5
  322. package/lang/translations/he.po +1 -5
  323. package/lang/translations/hi.po +1 -5
  324. package/lang/translations/hr.po +1 -5
  325. package/lang/translations/hu.po +1 -5
  326. package/lang/translations/hy.po +1 -5
  327. package/lang/translations/id.po +1 -5
  328. package/lang/translations/it.po +1 -5
  329. package/lang/translations/ja.po +1 -5
  330. package/lang/translations/jv.po +1 -5
  331. package/lang/translations/kk.po +1 -5
  332. package/lang/translations/km.po +1 -5
  333. package/lang/translations/kn.po +1 -5
  334. package/lang/translations/ko.po +1 -5
  335. package/lang/translations/ku.po +1 -5
  336. package/lang/translations/lt.po +1 -5
  337. package/lang/translations/lv.po +1 -5
  338. package/lang/translations/ms.po +1 -5
  339. package/lang/translations/nb.po +1 -5
  340. package/lang/translations/ne.po +1 -5
  341. package/lang/translations/nl.po +1 -5
  342. package/lang/translations/no.po +1 -5
  343. package/lang/translations/oc.po +1 -5
  344. package/lang/translations/pl.po +1 -5
  345. package/lang/translations/pt-br.po +1 -5
  346. package/lang/translations/pt.po +1 -5
  347. package/lang/translations/ro.po +1 -5
  348. package/lang/translations/ru.po +1 -5
  349. package/lang/translations/si.po +1 -5
  350. package/lang/translations/sk.po +1 -5
  351. package/lang/translations/sl.po +1 -5
  352. package/lang/translations/sq.po +1 -5
  353. package/lang/translations/sr-latn.po +1 -5
  354. package/lang/translations/sr.po +1 -5
  355. package/lang/translations/sv.po +1 -5
  356. package/lang/translations/th.po +1 -5
  357. package/lang/translations/ti.po +1 -5
  358. package/lang/translations/tk.po +1 -5
  359. package/lang/translations/tr.po +1 -5
  360. package/lang/translations/tt.po +1 -5
  361. package/lang/translations/ug.po +1 -5
  362. package/lang/translations/uk.po +1 -5
  363. package/lang/translations/ur.po +1 -5
  364. package/lang/translations/uz.po +1 -5
  365. package/lang/translations/vi.po +1 -5
  366. package/lang/translations/zh-cn.po +1 -5
  367. package/lang/translations/zh.po +1 -5
  368. package/package.json +28 -6
  369. package/src/augmentation.d.ts +1 -1
  370. package/src/augmentation.js +1 -1
  371. package/src/index.d.ts +1 -1
  372. package/src/index.js +2 -2
  373. package/src/legacyerrors.d.ts +1 -1
  374. package/src/legacyerrors.js +2 -2
  375. package/src/template.d.ts +1 -1
  376. package/src/template.js +2 -2
  377. package/src/templatecommand.d.ts +1 -1
  378. package/src/templatecommand.js +2 -2
  379. package/src/templateediting.d.ts +1 -1
  380. package/src/templateediting.js +2 -2
  381. package/src/templateui.d.ts +1 -1
  382. package/src/templateui.js +2 -2
  383. package/src/ui/templatelistbuttonview.d.ts +1 -1
  384. package/src/ui/templatelistbuttonview.js +2 -2
  385. package/src/ui/templatelistitemview.d.ts +1 -1
  386. package/src/ui/templatelistitemview.js +2 -2
  387. package/src/ui/templatelistview.d.ts +1 -1
  388. package/src/ui/templatelistview.js +2 -2
  389. package/src/utils/common-translations.d.ts +1 -1
  390. package/src/utils/common-translations.js +2 -2
  391. package/theme/template.css +1 -1
  392. package/dist/augmentation.d.ts +0 -27
  393. package/dist/index.d.ts +0 -17
  394. package/dist/legacyerrors.d.ts +0 -9
  395. package/dist/template.d.ts +0 -127
  396. package/dist/templatecommand.d.ts +0 -27
  397. package/dist/templateediting.d.ts +0 -34
  398. package/dist/templateui.d.ts +0 -41
  399. package/dist/ui/templatelistbuttonview.d.ts +0 -108
  400. package/dist/ui/templatelistitemview.d.ts +0 -38
  401. package/dist/ui/templatelistview.d.ts +0 -42
  402. package/dist/utils/common-translations.d.ts +0 -13
@@ -1,27 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- import type { Template, TemplateCommand, TemplateEditing, TemplateUI, TemplateConfig } from './index.js';
10
- declare module '@ckeditor/ckeditor5-core' {
11
- interface PluginsMap {
12
- [Template.pluginName]: Template;
13
- [TemplateEditing.pluginName]: TemplateEditing;
14
- [TemplateUI.pluginName]: TemplateUI;
15
- }
16
- interface CommandsMap {
17
- insertTemplate: TemplateCommand;
18
- }
19
- interface EditorConfig {
20
- /**
21
- * The configuration of the {@link module:template/template~Template} feature.
22
- *
23
- * Read more in {@link module:template/template~TemplateConfig}.
24
- */
25
- template?: TemplateConfig;
26
- }
27
- }
package/dist/index.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template
11
- */
12
- export { default as Template } from './template.js';
13
- export { default as TemplateCommand } from './templatecommand.js';
14
- export { default as TemplateEditing } from './templateediting.js';
15
- export { default as TemplateUI } from './templateui.js';
16
- export type { TemplateConfig, TemplateDefinition } from './template.js';
17
- import './augmentation.js';
@@ -1,9 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- export {};
@@ -1,127 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/template
11
- * @publicApi
12
- */
13
- import { Plugin } from 'ckeditor5/src/core.js';
14
- import TemplateEditing from './templateediting.js';
15
- import TemplateUI from './templateui.js';
16
- /**
17
- * The template feature.
18
- *
19
- * For a detailed overview, check the {@glink features/template Content templates} feature guide.
20
- */
21
- export default class Template extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires(): readonly [typeof TemplateEditing, typeof TemplateUI];
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName(): "Template";
30
- /**
31
- * @inheritDoc
32
- */
33
- static get isOfficialPlugin(): true;
34
- /**
35
- * @inheritDoc
36
- */
37
- static get isPremiumPlugin(): true;
38
- }
39
- /**
40
- * The configuration of the template feature.
41
- *
42
- * ```ts
43
- * ClassicEditor
44
- * .create( {
45
- * template: ... // Template feature configuration.
46
- * } )
47
- * .then( ... )
48
- * .catch( ... );
49
- *```
50
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
51
- */
52
- export interface TemplateConfig {
53
- /**
54
- * A list of all template definitions to be displayed in the `'insertTemplate'` UI dropdown.
55
- *
56
- * An example configuration:
57
- *
58
- * ```json
59
- * {
60
- * template: {
61
- * definitions: [
62
- * {
63
- * title: 'Issue acknowledgement (plain text)',
64
- * data: 'Dear customer, thank you for your report! The issue is currently being worked on by our development team.'
65
- * },
66
- * {
67
- * title: 'Signature (multi-line)',
68
- * data: '<p><b>Jane Doe</b></p><p>Marketing Specialist at <a href="https://example.com>Example.com</a></p>',
69
- * description: 'Author signature with the link to the website.'
70
- * },
71
- * {
72
- * title: 'Example table',
73
- * data: '<table><tr><td>Cell #1</td><td></td></tr><tr><td></td><td>Cell #2</td></tr></table>',
74
- * icon: '<svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg">...</svg>',
75
- * description: 'This template inserts a table.'
76
- * },
77
- * {
78
- * title: 'Insert userAgent data',
79
- * data: navigator.userAgent
80
- * },
81
- * {
82
- * title: 'Insert translate to English link (function)',
83
- * data: () => '<a href="' + location.href + '/en" title="Translate to English">Translate to English</a>'
84
- * },
85
- * // ...
86
- * ]
87
- * }
88
- * }
89
- * ```
90
- */
91
- definitions?: Array<TemplateDefinition>;
92
- }
93
- /**
94
- * An object describing a single template definition.
95
- *
96
- * ```json
97
- * {
98
- * // Mandatory fields:
99
- * title: 'Example template',
100
- * data: '<table><tr><td>Cell #1</td><td></td></tr><tr><td></td><td>Cell #2</td></tr></table>',
101
- *
102
- * // Optional configuration:
103
- * icon: '<svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg">...</svg>',
104
- * description: 'This template inserts a table.'
105
- * }
106
- * ```
107
- */
108
- export type TemplateDefinition = {
109
- /**
110
- * The title of the template.
111
- */
112
- title: string;
113
- /**
114
- * An HTML string to be inserted into the document or a callback function that returns an HTML string
115
- * to be inserted into the document when the template is selected.
116
- */
117
- data: (() => string) | string;
118
- /**
119
- * An optional SVG string representing the icon of the template. The default size of the icon is 45x45 pixels.
120
- * Be sure to set the correct `viewBox` attribute in the icon source. If not provided, a generic icon will be used instead.
121
- */
122
- icon?: string;
123
- /**
124
- * An optional long description of the template presented to the users.
125
- */
126
- description?: string;
127
- };
@@ -1,27 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/templatecommand
11
- * @publicApi
12
- */
13
- import { Command } from 'ckeditor5/src/core.js';
14
- /**
15
- * The template command.
16
- *
17
- * Inserts a template into the editor content.
18
- */
19
- export default class TemplateCommand extends Command {
20
- /**
21
- * Inserts the template data at the position of the selection.
22
- *
23
- * @fires execute
24
- * @param templateData Template data should be a raw HTML string or a function that returns one.
25
- */
26
- execute(templateData: string | Function): void;
27
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/templateediting
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- /**
14
- * The template editing plugin.
15
- */
16
- export default class TemplateEditing extends Plugin {
17
- /**
18
- * @inheritDoc
19
- */
20
- static get pluginName(): "TemplateEditing";
21
- /**
22
- * @inheritDoc
23
- */
24
- static get isOfficialPlugin(): true;
25
- /**
26
- * @inheritDoc
27
- */
28
- static get isPremiumPlugin(): true;
29
- init(): void;
30
- /**
31
- * @inheritDoc
32
- */
33
- destroy(): void;
34
- }
@@ -1,41 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/templateui
11
- */
12
- import { Plugin } from 'ckeditor5/src/core.js';
13
- import '../theme/template.css';
14
- /**
15
- * The UI plugin of the template feature.
16
- *
17
- * It registers the `'insertTemplate'` UI dropdown in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
18
- * that displays a list of templates and allows to insert them into the editor content.
19
- */
20
- export default class TemplateUI extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName(): "TemplateUI";
25
- /**
26
- * @inheritDoc
27
- */
28
- static get isOfficialPlugin(): true;
29
- /**
30
- * @inheritDoc
31
- */
32
- static get isPremiumPlugin(): true;
33
- /**
34
- * @inheritDoc
35
- */
36
- init(): void;
37
- /**
38
- * @inheritDoc
39
- */
40
- afterInit(): void;
41
- }
@@ -1,108 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/ui/templatelistbuttonview
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- import { ButtonView, HighlightedTextView, View } from 'ckeditor5/src/ui.js';
14
- import type { TemplateDefinition } from '../template.js';
15
- /**
16
- * A class representing an individual button (template) in the list. Renders a rich preview of the template option.
17
- *
18
- * @protected
19
- */
20
- export default class TemplateListButtonView extends ButtonView {
21
- /**
22
- * The definition of the template that the button will apply when executed.
23
- *
24
- * @readonly
25
- */
26
- templateDefinition: TemplateDefinition;
27
- /**
28
- * The view rendering the text part of the template definition.
29
- *
30
- * @protected
31
- * @readonly
32
- */
33
- textPartView: TextPartView | null;
34
- /**
35
- * Creates an instance of the {@link module:template/ui/templatelistbuttonview~TemplateListButtonView} class.
36
- *
37
- * @param locale The localization services instance.
38
- * @param templateDefinition The definition of the template.
39
- */
40
- constructor(locale: Locale, templateDefinition: TemplateDefinition);
41
- /**
42
- * @inheritDoc
43
- */
44
- render(): void;
45
- destroy(): void;
46
- /**
47
- * Tells whether the `title` or `description` of the {@link #templateDefinition} match against the provided regular expression.
48
- *
49
- * @param regExp A regular expression to match the definition against.
50
- * @returns When the match is positive, an object with the `title` and `description` keys is returned that describes
51
- * the match. Otherwise, this method returns `null`.
52
- */
53
- isMatching(regExp: RegExp): object | null;
54
- /**
55
- * Highlights a subset of the {@link #textPartView} text according to a specified regular expression. When `null` is passed,
56
- * the highlighting is turned off.
57
- *
58
- * @param regExp A regular expression used to highlight the matching text in the {@link #textPartView}.
59
- */
60
- highlightText(regExp: RegExp | null): void;
61
- }
62
- /**
63
- * A view representing the title and the description of the template.
64
- *
65
- * @protected
66
- */
67
- export declare class TextPartView extends View {
68
- /**
69
- * The title text of the template.
70
- *
71
- * @readonly
72
- */
73
- title: string;
74
- /**
75
- * The description text of the template.
76
- *
77
- * @readonly
78
- */
79
- description: string | undefined;
80
- /**
81
- * Renders the title text of a template.
82
- *
83
- * **Note**: It acts as a label of the entire button in the context of accessibility.
84
- *
85
- * @readonly
86
- */
87
- titleView: HighlightedTextView;
88
- /**
89
- * Renders the description text of a template.
90
- *
91
- * @readonly
92
- */
93
- descriptionView: HighlightedTextView;
94
- /**
95
- * Creates an instance of the text part view.
96
- *
97
- * @param locale The {@link module:core/editor/editor~Editor#locale} instance.
98
- * @param templateDefinition The definition of the template.
99
- * @param labelId A unique ID that connects the entire button with the {@link #titleView} in the context of accessibility.
100
- */
101
- constructor(locale: Locale, templateDefinition: TemplateDefinition, labelId: string);
102
- /**
103
- * Highlights a subset of the {@link #titleView} and {@link #descriptionView} text according to a specified regular expression.
104
- *
105
- * @param regExp
106
- */
107
- highlightText(regExp: RegExp | null): void;
108
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/ui/templatelistitemview
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- import { ListItemView } from 'ckeditor5/src/ui.js';
14
- import type TemplateListButtonView from './templatelistbuttonview.js';
15
- /**
16
- * A view representing an item in the list of tempaltes.
17
- *
18
- * @protected
19
- */
20
- export default class TemplateListItemView extends ListItemView {
21
- /**
22
- * The initial index of the item in the list of templates.
23
- * Useful while searching and sorting to reverse the list to the same order.
24
- */
25
- readonly originalIndex: number;
26
- /**
27
- * The instance of the template button view containing the title,
28
- * icon, and description of the template.
29
- */
30
- buttonView: TemplateListButtonView | null;
31
- /**
32
- * Creates an instance of the {@link module:template/ui/templatelistitemview~TemplateListItemView} class.
33
- *
34
- * @param locale The localization services instance.
35
- * @param originalIndex The initial index of the item in the list of templates.
36
- */
37
- constructor(locale: Locale, originalIndex: number);
38
- }
@@ -1,42 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/ui/templatelistview
11
- */
12
- import { ListView, type FilteredView } from 'ckeditor5/src/ui.js';
13
- /**
14
- * The template list view class with filtering and sorting.
15
- *
16
- * @private
17
- */
18
- export default class TemplateListView extends ListView implements FilteredView {
19
- /**
20
- * Filters the list of templates according to a specified regular expression. The filtered list is sorted so that items that
21
- * match the regular expression in their titles are displayed first.
22
- *
23
- * Matching items highlight the regular expression (query) in their titles and/or descriptions.
24
- *
25
- * **Note**: The `Collection` (also `ViewCollection`) class does not provide sorting functionality. Thus, the functionality
26
- * implemented in this method is **extremely inefficient** because it clones the entire collection, sorts it as an array,
27
- * then purges the original collection and sets it from scratch with the sorted array. Purging and resetting the
28
- * collection triggers an avalanche of `add` and `remove` events synchronously handled by the `Template` (UI bindings)
29
- * and **rendered in the DOM**. As long as sorting takes shorter than rendering of the DOM this should not be noticeable
30
- * but the moment it does not, the UI will start glitching. A proper `Collection#sort` is needed to work around
31
- * this overhead (see https://github.com/ckeditor/ckeditor5/issues/2065).
32
- *
33
- * **Note**: Passing `null` to this method resets the list to its original state.
34
- *
35
- * @param regExp A regular expression used to match the list title and description.
36
- * @returns True if some list items matched the regular expression. False otherwise.
37
- */
38
- filter(regExp: RegExp | null): {
39
- resultsCount: number;
40
- totalItemsCount: number;
41
- };
42
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
8
- */
9
- /**
10
- * @module template/utils/common-translations
11
- */
12
- import type { Locale } from 'ckeditor5/src/utils.js';
13
- export declare function getTranslation(locale: Locale, id: string, ...args: Array<any>): string;