@ckeditor/ckeditor5-template 39.0.1 → 40.0.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.
- package/CHANGELOG.md +1 -1
- package/LICENSE.md +4 -4
- package/README.md +7 -7
- package/build/template.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +1 -2
- package/lang/translations/ar.po +1 -4
- package/lang/translations/bg.po +1 -4
- package/lang/translations/bn.po +1 -4
- package/lang/translations/ca.po +1 -4
- package/lang/translations/cs.po +1 -4
- package/lang/translations/da.po +1 -4
- package/lang/translations/de.po +1 -4
- package/lang/translations/el.po +1 -4
- package/lang/translations/en-au.po +1 -4
- package/lang/translations/en.po +1 -4
- package/lang/translations/es.po +1 -4
- package/lang/translations/et.po +1 -4
- package/lang/translations/fi.po +1 -4
- package/lang/translations/fr.po +1 -4
- package/lang/translations/gl.po +1 -4
- package/lang/translations/he.po +1 -4
- package/lang/translations/hi.po +1 -4
- package/lang/translations/hr.po +1 -4
- package/lang/translations/hu.po +1 -4
- package/lang/translations/id.po +1 -4
- package/lang/translations/it.po +1 -4
- package/lang/translations/ja.po +1 -4
- package/lang/translations/ko.po +1 -4
- package/lang/translations/lt.po +1 -4
- package/lang/translations/lv.po +1 -4
- package/lang/translations/ms.po +1 -4
- package/lang/translations/nl.po +1 -4
- package/lang/translations/no.po +1 -4
- package/lang/translations/pl.po +1 -4
- package/lang/translations/pt-br.po +1 -4
- package/lang/translations/pt.po +1 -4
- package/lang/translations/ro.po +1 -4
- package/lang/translations/ru.po +1 -4
- package/lang/translations/sk.po +1 -4
- package/lang/translations/sr.po +1 -4
- package/lang/translations/sv.po +1 -4
- package/lang/translations/th.po +1 -4
- package/lang/translations/tr.po +1 -4
- package/lang/translations/uk.po +1 -4
- package/lang/translations/uz.po +1 -4
- package/lang/translations/vi.po +1 -4
- package/lang/translations/zh-cn.po +1 -4
- package/lang/translations/zh.po +1 -4
- package/package.json +3 -8
- package/src/augmentation.d.ts +23 -23
- package/src/index.d.ts +13 -13
- package/src/index.js +1 -1
- package/src/template.d.ts +115 -115
- package/src/template.js +1 -1
- package/src/templatecommand.d.ts +23 -23
- package/src/templatecommand.js +1 -1
- package/src/templateediting.d.ts +30 -30
- package/src/templateediting.js +1 -1
- package/src/templateui.d.ts +29 -29
- package/src/templateui.js +1 -1
- package/src/ui/templatelistbuttonview.d.ts +104 -104
- package/src/ui/templatelistbuttonview.js +1 -1
- package/src/ui/templatelistitemview.d.ts +34 -34
- package/src/ui/templatelistitemview.js +1 -1
- package/src/ui/templatelistview.d.ts +38 -0
- package/src/ui/templatelistview.js +23 -0
- package/theme/template.css +95 -187
- package/build/translations/sq.js +0 -1
- package/lang/translations/sq.po +0 -41
- package/src/ui/templateforminfoview.d.ts +0 -51
- package/src/ui/templateforminfoview.js +0 -23
- package/src/ui/templateformsearchfieldview.d.ts +0 -43
- package/src/ui/templateformsearchfieldview.js +0 -23
- package/src/ui/templateformview.d.ts +0 -110
- package/src/ui/templateformview.js +0 -23
- package/theme/icons/loupe.svg +0 -1
package/lang/translations/ro.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Romanian (https://app.transifex.com/ckeditor/teams/11143/ro/)\n"
|
|
16
16
|
"Language: ro\n"
|
|
17
17
|
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Vă rugăm să încercați o altă expresie sau verificați ortografia."
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "Căutare șablon"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "Ștergere"
|
package/lang/translations/ru.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Russian (https://app.transifex.com/ckeditor/teams/11143/ru/)\n"
|
|
16
16
|
"Language: ru\n"
|
|
17
17
|
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Пожалуйста, попробуйте другую фразу ил
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "Поиск шаблона"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "Очистить"
|
package/lang/translations/sk.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Slovak (https://app.transifex.com/ckeditor/teams/11143/sk/)\n"
|
|
16
16
|
"Language: sk\n"
|
|
17
17
|
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Skúste inú frázu alebo skontrolujte pravopis."
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "Vyhľadávanie šablóny"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "Vyčistiť"
|
package/lang/translations/sr.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Serbian (https://app.transifex.com/ckeditor/teams/11143/sr/)\n"
|
|
16
16
|
"Language: sr\n"
|
|
17
17
|
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Pokušajte sa drugom frazom ili proverite pravopis."
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "Potraži predložak"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "Obriši"
|
package/lang/translations/sv.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Swedish (https://app.transifex.com/ckeditor/teams/11143/sv/)\n"
|
|
16
16
|
"Language: sv\n"
|
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Prova en annan fras eller kontrollera stavningen."
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
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"
|
package/lang/translations/th.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Thai (https://app.transifex.com/ckeditor/teams/11143/th/)\n"
|
|
16
16
|
"Language: th\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "โปรดลองใช้วลีอื่นหรือตรว
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "ค้นหาเทมเพลต"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "ล้าง"
|
package/lang/translations/tr.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Turkish (https://app.transifex.com/ckeditor/teams/11143/tr/)\n"
|
|
16
16
|
"Language: tr\n"
|
|
17
17
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Lütfen farklı bir kelime grubu deneyin veya yazım denetimi yapın."
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
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"
|
package/lang/translations/uk.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Ukrainian (https://app.transifex.com/ckeditor/teams/11143/uk/)\n"
|
|
16
16
|
"Language: uk\n"
|
|
17
17
|
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Будь ласка, спробуйте іншу фразу або пе
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "Шукати шаблон"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "Очистити"
|
package/lang/translations/uz.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Uzbek (https://app.transifex.com/ckeditor/teams/11143/uz/)\n"
|
|
16
16
|
"Language: uz\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Iltimos, boshqa iborani sinab ko'ring yoki imloni tekshiring."
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
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"
|
package/lang/translations/vi.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Vietnamese (https://app.transifex.com/ckeditor/teams/11143/vi/)\n"
|
|
16
16
|
"Language: vi\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "Vui lòng thử một cụm từ khác hoặc kiểm tra lại cụm t
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
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"
|
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Chinese (China) (https://app.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
|
|
16
16
|
"Language: zh_CN\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "请尝试使用不同的短语或检查拼写。"
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
msgstr "搜索模板"
|
|
38
|
-
|
|
39
|
-
msgctxt "The label of the button that clears the value of the search templates input."
|
|
40
|
-
msgid "Clear"
|
|
41
|
-
msgstr "清除"
|
package/lang/translations/zh.po
CHANGED
|
@@ -15,6 +15,7 @@ msgstr ""
|
|
|
15
15
|
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
|
|
16
16
|
"Language: zh_TW\n"
|
|
17
17
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
19
|
|
|
19
20
|
msgctxt "The toolbar button tooltip for the template feature."
|
|
20
21
|
msgid "Insert template"
|
|
@@ -35,7 +36,3 @@ msgstr "請嘗試其他詞彙或確認拼寫是否正確。"
|
|
|
35
36
|
msgctxt "The label of the input allowing users to search templates."
|
|
36
37
|
msgid "Search template"
|
|
37
38
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-template",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "40.0.0",
|
|
4
4
|
"description": "Template feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -21,13 +21,8 @@
|
|
|
21
21
|
],
|
|
22
22
|
"main": "src/index.js",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"ckeditor5": "
|
|
25
|
-
"@ckeditor/ckeditor5-ui": "
|
|
26
|
-
"lodash-es": "4.17.21"
|
|
27
|
-
},
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=16.0.0",
|
|
30
|
-
"npm": ">=5.7.1"
|
|
24
|
+
"ckeditor5": "40.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-ui": "40.0.0"
|
|
31
26
|
},
|
|
32
27
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
33
28
|
"author": "CKSource (http://cksource.com/)",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,23 +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
|
-
}
|
|
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
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,13 +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, TemplateDefinition } from './template';
|
|
10
|
-
export declare const icons: {
|
|
11
|
-
templateIcon: string;
|
|
12
|
-
};
|
|
13
|
-
import './augmentation';
|
|
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, TemplateDefinition } from './template';
|
|
10
|
+
export declare const icons: {
|
|
11
|
+
templateIcon: string;
|
|
12
|
+
};
|
|
13
|
+
import './augmentation';
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import
|
|
23
|
+
import _0x106564 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':_0x106564};import'./augmentation';
|
package/src/template.d.ts
CHANGED
|
@@ -1,115 +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(): readonly [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
|
-
};
|
|
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(): readonly [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
|
+
};
|
package/src/template.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x4a65=['requires'];(function(_0xe4c03b,_0x4a6589){var _0x34132f=function(_0x29b786){while(--_0x29b786){_0xe4c03b['push'](_0xe4c03b['shift']());}};_0x34132f(++_0x4a6589);}(_0x4a65,0xa0));var _0x3413=function(_0xe4c03b,_0x4a6589){_0xe4c03b=_0xe4c03b-0x0;var _0x34132f=_0x4a65[_0xe4c03b];return _0x34132f;};import{Plugin as _0x293c35}from'ckeditor5/src/core';import _0x5d5ad1 from'./templateediting';import _0x12c507 from'./templateui';export default class o extends _0x293c35{static get[_0x3413('0x0')](){return[_0x5d5ad1,_0x12c507];}static get['pluginName'](){return'Template';}}
|
package/src/templatecommand.d.ts
CHANGED
|
@@ -1,23 +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
|
-
}
|
|
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
|
+
}
|
package/src/templatecommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5abc=['htmlProcessor','toModel','function','insertContent','editor','string','change','data','toView'];(function(_0x38e5ef,_0x5abcea){const _0x19d4d3=function(_0x45fabb){while(--_0x45fabb){_0x38e5ef['push'](_0x38e5ef['shift']());}};_0x19d4d3(++_0x5abcea);}(_0x5abc,0x153));const _0x19d4=function(_0x38e5ef,_0x5abcea){_0x38e5ef=_0x38e5ef-0x0;let _0x19d4d3=_0x5abc[_0x38e5ef];return _0x19d4d3;};import{Command as _0x11ce19}from'ckeditor5/src/core';export default class c extends _0x11ce19{['execute'](_0x44e6e7){const {model:_0x2c19e0}=this['editor'];let _0x468ad;switch(typeof _0x44e6e7){case _0x19d4('0x8'):_0x468ad=_0x44e6e7;break;case _0x19d4('0x5'):_0x468ad=_0x44e6e7();}_0x19d4('0x8')==typeof _0x468ad&&_0x2c19e0[_0x19d4('0x0')](()=>{const _0x3dc5ab=this[_0x19d4('0x7')][_0x19d4('0x1')][_0x19d4('0x3')][_0x19d4('0x2')](_0x468ad),_0x305cd1=this[_0x19d4('0x7')][_0x19d4('0x1')][_0x19d4('0x4')](_0x3dc5ab);_0x2c19e0[_0x19d4('0x6')](_0x305cd1);});}}
|