@ckeditor/ckeditor5-template 0.0.1 → 38.0.0-rc.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 (115) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +36 -3
  3. package/build/template.js +5 -0
  4. package/build/translations/ar.js +1 -0
  5. package/build/translations/bg.js +1 -0
  6. package/build/translations/bn.js +1 -0
  7. package/build/translations/ca.js +1 -0
  8. package/build/translations/cs.js +1 -0
  9. package/build/translations/da.js +1 -0
  10. package/build/translations/de.js +1 -0
  11. package/build/translations/el.js +1 -0
  12. package/build/translations/en-au.js +1 -0
  13. package/build/translations/es.js +1 -0
  14. package/build/translations/et.js +1 -0
  15. package/build/translations/fi.js +1 -0
  16. package/build/translations/fr.js +1 -0
  17. package/build/translations/he.js +1 -0
  18. package/build/translations/hi.js +1 -0
  19. package/build/translations/hr.js +1 -0
  20. package/build/translations/hu.js +1 -0
  21. package/build/translations/id.js +1 -0
  22. package/build/translations/it.js +1 -0
  23. package/build/translations/ja.js +1 -0
  24. package/build/translations/ko.js +1 -0
  25. package/build/translations/lt.js +1 -0
  26. package/build/translations/lv.js +1 -0
  27. package/build/translations/ms.js +1 -0
  28. package/build/translations/nl.js +1 -0
  29. package/build/translations/no.js +1 -0
  30. package/build/translations/pl.js +1 -0
  31. package/build/translations/pt-br.js +1 -0
  32. package/build/translations/pt.js +1 -0
  33. package/build/translations/ro.js +1 -0
  34. package/build/translations/ru.js +1 -0
  35. package/build/translations/sk.js +1 -0
  36. package/build/translations/sr.js +1 -0
  37. package/build/translations/sv.js +1 -0
  38. package/build/translations/th.js +1 -0
  39. package/build/translations/tr.js +1 -0
  40. package/build/translations/uk.js +1 -0
  41. package/build/translations/uz.js +1 -0
  42. package/build/translations/vi.js +1 -0
  43. package/build/translations/zh-cn.js +1 -0
  44. package/build/translations/zh.js +1 -0
  45. package/ckeditor5-metadata.json +18 -0
  46. package/lang/contexts.json +8 -0
  47. package/lang/translations/ar.po +41 -0
  48. package/lang/translations/bg.po +41 -0
  49. package/lang/translations/bn.po +41 -0
  50. package/lang/translations/ca.po +41 -0
  51. package/lang/translations/cs.po +41 -0
  52. package/lang/translations/da.po +41 -0
  53. package/lang/translations/de.po +41 -0
  54. package/lang/translations/el.po +41 -0
  55. package/lang/translations/en-au.po +41 -0
  56. package/lang/translations/en.po +41 -0
  57. package/lang/translations/es.po +41 -0
  58. package/lang/translations/et.po +41 -0
  59. package/lang/translations/fi.po +41 -0
  60. package/lang/translations/fr.po +41 -0
  61. package/lang/translations/he.po +41 -0
  62. package/lang/translations/hi.po +41 -0
  63. package/lang/translations/hr.po +41 -0
  64. package/lang/translations/hu.po +41 -0
  65. package/lang/translations/id.po +41 -0
  66. package/lang/translations/it.po +41 -0
  67. package/lang/translations/ja.po +41 -0
  68. package/lang/translations/ko.po +41 -0
  69. package/lang/translations/lt.po +41 -0
  70. package/lang/translations/lv.po +41 -0
  71. package/lang/translations/ms.po +41 -0
  72. package/lang/translations/nl.po +41 -0
  73. package/lang/translations/no.po +41 -0
  74. package/lang/translations/pl.po +41 -0
  75. package/lang/translations/pt-br.po +41 -0
  76. package/lang/translations/pt.po +41 -0
  77. package/lang/translations/ro.po +41 -0
  78. package/lang/translations/ru.po +41 -0
  79. package/lang/translations/sk.po +41 -0
  80. package/lang/translations/sr.po +41 -0
  81. package/lang/translations/sv.po +41 -0
  82. package/lang/translations/th.po +41 -0
  83. package/lang/translations/tr.po +41 -0
  84. package/lang/translations/uk.po +41 -0
  85. package/lang/translations/uz.po +41 -0
  86. package/lang/translations/vi.po +41 -0
  87. package/lang/translations/zh-cn.po +41 -0
  88. package/lang/translations/zh.po +41 -0
  89. package/package.json +36 -4
  90. package/src/augmentation.d.ts +23 -0
  91. package/src/augmentation.js +23 -0
  92. package/src/index.d.ts +13 -0
  93. package/src/index.js +23 -0
  94. package/src/template.d.ts +115 -0
  95. package/src/template.js +23 -0
  96. package/src/templatecommand.d.ts +23 -0
  97. package/src/templatecommand.js +23 -0
  98. package/src/templateediting.d.ts +26 -0
  99. package/src/templateediting.js +23 -0
  100. package/src/templateui.d.ts +29 -0
  101. package/src/templateui.js +23 -0
  102. package/src/ui/templateforminfoview.d.ts +51 -0
  103. package/src/ui/templateforminfoview.js +23 -0
  104. package/src/ui/templateformsearchfieldview.d.ts +43 -0
  105. package/src/ui/templateformsearchfieldview.js +23 -0
  106. package/src/ui/templateformview.d.ts +110 -0
  107. package/src/ui/templateformview.js +23 -0
  108. package/src/ui/templatelistbuttonview.d.ts +104 -0
  109. package/src/ui/templatelistbuttonview.js +23 -0
  110. package/src/ui/templatelistitemview.d.ts +34 -0
  111. package/src/ui/templatelistitemview.js +23 -0
  112. package/theme/icons/loupe.svg +1 -0
  113. package/theme/icons/template-generic.svg +6 -0
  114. package/theme/icons/template.svg +1 -0
  115. package/theme/template.css +235 -0
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Swedish (https://app.transifex.com/ckeditor/teams/11143/sv/)\n"
16
+ "Language: sv\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "Infoga mall"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "Inga mallar finns."
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "Inga mallar hittades som matchar \"%0\"."
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "Prova en annan fras eller kontrollera stavningen."
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "Sök mall"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "Rensa"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Thai (https://app.transifex.com/ckeditor/teams/11143/th/)\n"
16
+ "Language: th\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "แทรกเทมเพลต"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "ไม่มีเทมเพลต"
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "ไม่พบเทมเพลตที่ตรงกับ \"%0\""
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "โปรดลองใช้วลีอื่นหรือตรวจสอบตัวสะกด"
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "ค้นหาเทมเพลต"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "ล้าง"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Turkish (https://app.transifex.com/ckeditor/teams/11143/tr/)\n"
16
+ "Language: tr\n"
17
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "Şablon ekle"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "Kullanılabilir şablon yok."
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "\"%0\" ile eşleşen şablon bulunamadı."
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "Lütfen farklı bir kelime grubu deneyin veya yazım denetimi yapın."
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "Şablon ara"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "Temizle"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Ukrainian (https://app.transifex.com/ckeditor/teams/11143/uk/)\n"
16
+ "Language: uk\n"
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
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "Вставити шаблон"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "Немає доступних шаблонів"
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "Не знайдено шаблонів, які б відповідали \"%0\"."
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "Будь ласка, спробуйте іншу фразу або перевірте написання."
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "Шукати шаблон"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "Очистити"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Uzbek (https://app.transifex.com/ckeditor/teams/11143/uz/)\n"
16
+ "Language: uz\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "Shablonni kiritish"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "Hech qanday shablon mavjud emas."
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr ""
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "Iltimos, boshqa iborani sinab ko'ring yoki imloni tekshiring."
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "Shablonni qidirish"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "O'chirish"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Vietnamese (https://app.transifex.com/ckeditor/teams/11143/vi/)\n"
16
+ "Language: vi\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "Chèn mẫu sẵn"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "Không có mẫu sẵn nào."
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "Không tìm thấy mẫu sẵn nào khớp với \"%0\"."
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "Vui lòng thử một cụm từ khác hoặc kiểm tra lại cụm từ."
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "Tìm mẫu sẵn"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "Xóa"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Chinese (China) (https://app.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
16
+ "Language: zh_CN\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "插入模板"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "无可用的模板"
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "未找到与\"%0\"匹配的模板。"
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "请尝试使用不同的短语或检查拼写。"
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "搜索模板"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "清除"
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
16
+ "Language: zh_TW\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "The toolbar button tooltip for the template feature."
20
+ msgid "Insert template"
21
+ msgstr "插入範本"
22
+
23
+ msgctxt "The main text of the message shown to the user when no templates are available in the template feature."
24
+ msgid "No templates available."
25
+ msgstr "無可用範本。"
26
+
27
+ msgctxt "The main text of the message shown to the user when no templates are available for the search criteria."
28
+ msgid "No templates were found matching \"%0\"."
29
+ msgstr "找不到符合「%0」的範本"
30
+
31
+ msgctxt "The secondary text of the message shown to the user when no templates are available for the search criteria."
32
+ msgid "Please try a different phrase or check the spelling."
33
+ msgstr "請嘗試其他詞彙或確認拼寫是否正確。"
34
+
35
+ msgctxt "The label of the input allowing users to search templates."
36
+ msgid "Search template"
37
+ msgstr "搜尋範本"
38
+
39
+ msgctxt "The label of the button that clears the value of the search templates input."
40
+ msgid "Clear"
41
+ msgstr "清除"
package/package.json CHANGED
@@ -1,15 +1,47 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-template",
3
- "version": "0.0.1",
3
+ "version": "38.0.0-rc.0",
4
4
  "description": "Template feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
7
7
  "ckeditor5",
8
8
  "ckeditor 5",
9
- "ckeditor5-lib"
9
+ "ckeditor5-feature",
10
+ "ckeditor5-plugin",
11
+ "WYSIWYG",
12
+ "text",
13
+ "rich-text",
14
+ "richtext",
15
+ "ckeditor",
16
+ "editor",
17
+ "editing",
18
+ "html",
19
+ "contentEditable",
20
+ "template"
10
21
  ],
22
+ "main": "src/index.js",
23
+ "dependencies": {
24
+ "ckeditor5": "^38.0.0-rc.0",
25
+ "@ckeditor/ckeditor5-ui": "^38.0.0-rc.0",
26
+ "lodash-es": "^4.17.15"
27
+ },
28
+ "license": "SEE LICENSE IN LICENSE.md",
11
29
  "author": "CKSource (http://cksource.com/)",
12
- "license": "GPL-2.0-or-later",
13
30
  "homepage": "https://ckeditor.com/ckeditor-5",
14
- "bugs": "https://github.com/ckeditor/ckeditor5/issues"
31
+ "files": [
32
+ "lang",
33
+ "src/**/*.js",
34
+ "src/**/*.d.ts",
35
+ "theme",
36
+ "build",
37
+ "ckeditor5-metadata.json",
38
+ "CHANGELOG.md"
39
+ ],
40
+ "scripts": {
41
+ "build": "tsc -p ./tsconfig.json",
42
+ "postversion": "npm run build",
43
+ "dll:build": "webpack"
44
+ },
45
+ "types": "src/index.d.ts",
46
+ "obfuscated": true
15
47
  }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ import type { Template, TemplateCommand, TemplateEditing, TemplateUI, TemplateConfig } from './index';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface PluginsMap {
8
+ [Template.pluginName]: Template;
9
+ [TemplateEditing.pluginName]: TemplateEditing;
10
+ [TemplateUI.pluginName]: TemplateUI;
11
+ }
12
+ interface CommandsMap {
13
+ insertTemplate: TemplateCommand;
14
+ }
15
+ interface EditorConfig {
16
+ /**
17
+ * The configuration of the {@link module:template/template~Template} feature.
18
+ *
19
+ * Read more in {@link module:template/template~TemplateConfig}.
20
+ */
21
+ template?: TemplateConfig;
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ export{};
package/src/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ export { default as Template } from './template';
6
+ export { default as TemplateCommand } from './templatecommand';
7
+ export { default as TemplateEditing } from './templateediting';
8
+ export { default as TemplateUI } from './templateui';
9
+ export type { TemplateConfig } from './template';
10
+ export declare const icons: {
11
+ templateIcon: string;
12
+ };
13
+ import './augmentation';
package/src/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ import _0x4d3aa1 from'./../theme/icons/template.svg';export{default as Template}from'./template';export{default as TemplateCommand}from'./templatecommand';export{default as TemplateEditing}from'./templateediting';export{default as TemplateUI}from'./templateui';export const icons={'templateIcon':_0x4d3aa1};import'./augmentation';
@@ -0,0 +1,115 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module template/template
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from 'ckeditor5/src/core';
10
+ import TemplateEditing from './templateediting';
11
+ import TemplateUI from './templateui';
12
+ /**
13
+ * The template feature.
14
+ *
15
+ * For a detailed overview, check the {@glink features/template Content templates} feature guide.
16
+ */
17
+ export default class Template extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires(): (typeof TemplateEditing | typeof TemplateUI)[];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): 'Template';
26
+ }
27
+ /**
28
+ * The configuration of the template feature.
29
+ *
30
+ * ```ts
31
+ * ClassicEditor
32
+ * .create( {
33
+ * template: ... // Template feature configuration.
34
+ * } )
35
+ * .then( ... )
36
+ * .catch( ... );
37
+ *```
38
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
39
+ */
40
+ export interface TemplateConfig {
41
+ /**
42
+ * A list of all template definitions to be displayed in the `'insertTemplate'` UI dropdown.
43
+ *
44
+ * An example configuration:
45
+ *
46
+ * ```json
47
+ * {
48
+ * template: {
49
+ * definitions: [
50
+ * {
51
+ * title: 'Issue acknowledgement (plain text)',
52
+ * data: 'Dear customer, thank you for your report! The issue is currently being worked on by our development team.'
53
+ * },
54
+ * {
55
+ * title: 'Signature (multi-line)',
56
+ * data: '<p><b>Jane Doe</b></p><p>Marketing Specialist at <a href="https://example.com>Example.com</a></p>',
57
+ * description: 'Author signature with the link to the website.'
58
+ * },
59
+ * {
60
+ * title: 'Example table',
61
+ * data: '<table><tr><td>Cell #1</td><td></td></tr><tr><td></td><td>Cell #2</td></tr></table>',
62
+ * icon: '<svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg">...</svg>',
63
+ * description: 'This template inserts a table.'
64
+ * },
65
+ * {
66
+ * title: 'Insert userAgent data',
67
+ * data: navigator.userAgent
68
+ * },
69
+ * {
70
+ * title: 'Insert translate to English link (function)',
71
+ * data: () => '<a href="' + location.href + '/en" title="Translate to English">Translate to English</a>'
72
+ * },
73
+ * // ...
74
+ * ]
75
+ * }
76
+ * }
77
+ * ```
78
+ */
79
+ definitions?: Array<TemplateDefinition>;
80
+ }
81
+ /**
82
+ * An object describing a single template definition.
83
+ *
84
+ * ```json
85
+ * {
86
+ * // Mandatory fields:
87
+ * title: 'Example template',
88
+ * data: '<table><tr><td>Cell #1</td><td></td></tr><tr><td></td><td>Cell #2</td></tr></table>',
89
+ *
90
+ * // Optional configuration:
91
+ * icon: '<svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg">...</svg>',
92
+ * description: 'This template inserts a table.'
93
+ * }
94
+ * ```
95
+ */
96
+ export type TemplateDefinition = {
97
+ /**
98
+ * The title of the template.
99
+ */
100
+ title: string;
101
+ /**
102
+ * An HTML string to be inserted into the document or a callback function that returns an HTML string
103
+ * to be inserted into the document when the template is selected.
104
+ */
105
+ data: () => string | string;
106
+ /**
107
+ * An optional SVG string representing the icon of the template. The default size of the icon is 45x45 pixels.
108
+ * Be sure to set the correct `viewBox` attribute in the icon source. If not provided, a generic icon will be used instead.
109
+ */
110
+ icon?: string;
111
+ /**
112
+ * An optional long description of the template presented to the users.
113
+ */
114
+ description?: string;
115
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2016 - 2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ var _0x28d3=['Template','requires','pluginName'];(function(_0x386799,_0x28d37f){var _0x3e2471=function(_0x3667d0){while(--_0x3667d0){_0x386799['push'](_0x386799['shift']());}};_0x3e2471(++_0x28d37f);}(_0x28d3,0x151));var _0x3e24=function(_0x386799,_0x28d37f){_0x386799=_0x386799-0x0;var _0x3e2471=_0x28d3[_0x386799];return _0x3e2471;};import{Plugin as _0x5a0f6b}from'ckeditor5/src/core';import _0xa0f996 from'./templateediting';import _0x50413e from'./templateui';export default class o extends _0x5a0f6b{static get[_0x3e24('0x0')](){return[_0xa0f996,_0x50413e];}static get[_0x3e24('0x1')](){return _0x3e24('0x2');}}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, 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
+ * @module template/templatecommand
7
+ * @publicApi
8
+ */
9
+ import { Command } from 'ckeditor5/src/core';
10
+ /**
11
+ * The template command.
12
+ *
13
+ * Inserts a template into the editor content.
14
+ */
15
+ export default class TemplateCommand extends Command {
16
+ /**
17
+ * Inserts the template data at the position of the selection.
18
+ *
19
+ * @fires execute
20
+ * @param templateData Template data should be a raw HTML string or a function that returns one.
21
+ */
22
+ execute(templateData: string | Function): void;
23
+ }