@ckeditor/ckeditor5-template 44.1.0 → 44.2.0-alpha.1
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/build/template.js +3 -3
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.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-ch.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/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.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/gu.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/hy.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/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.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/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.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/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.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/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.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/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +4 -4
- package/dist/index.js +2 -2
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/contexts.json +6 -7
- package/lang/translations/af.po +1 -5
- package/lang/translations/ar.po +1 -5
- package/lang/translations/ast.po +1 -5
- package/lang/translations/az.po +1 -5
- package/lang/translations/bg.po +1 -5
- package/lang/translations/bn.po +1 -5
- package/lang/translations/bs.po +1 -5
- package/lang/translations/ca.po +1 -5
- package/lang/translations/cs.po +1 -5
- package/lang/translations/da.po +1 -5
- package/lang/translations/de-ch.po +1 -5
- package/lang/translations/de.po +1 -5
- package/lang/translations/el.po +1 -5
- package/lang/translations/en-au.po +1 -5
- package/lang/translations/en-gb.po +1 -5
- package/lang/translations/en.po +1 -5
- package/lang/translations/eo.po +1 -5
- package/lang/translations/es-co.po +1 -5
- package/lang/translations/es.po +1 -5
- package/lang/translations/et.po +1 -5
- package/lang/translations/eu.po +1 -5
- package/lang/translations/fa.po +1 -5
- package/lang/translations/fi.po +1 -5
- package/lang/translations/fr.po +1 -5
- package/lang/translations/gl.po +1 -5
- package/lang/translations/gu.po +1 -5
- package/lang/translations/he.po +1 -5
- package/lang/translations/hi.po +1 -5
- package/lang/translations/hr.po +1 -5
- package/lang/translations/hu.po +1 -5
- package/lang/translations/hy.po +1 -5
- package/lang/translations/id.po +1 -5
- package/lang/translations/it.po +1 -5
- package/lang/translations/ja.po +1 -5
- package/lang/translations/jv.po +1 -5
- package/lang/translations/kk.po +1 -5
- package/lang/translations/km.po +1 -5
- package/lang/translations/kn.po +1 -5
- package/lang/translations/ko.po +1 -5
- package/lang/translations/ku.po +1 -5
- package/lang/translations/lt.po +1 -5
- package/lang/translations/lv.po +1 -5
- package/lang/translations/ms.po +1 -5
- package/lang/translations/nb.po +1 -5
- package/lang/translations/ne.po +1 -5
- package/lang/translations/nl.po +1 -5
- package/lang/translations/no.po +1 -5
- package/lang/translations/oc.po +1 -5
- package/lang/translations/pl.po +1 -5
- package/lang/translations/pt-br.po +1 -5
- package/lang/translations/pt.po +1 -5
- package/lang/translations/ro.po +1 -5
- package/lang/translations/ru.po +1 -5
- package/lang/translations/si.po +1 -5
- package/lang/translations/sk.po +1 -5
- package/lang/translations/sl.po +1 -5
- package/lang/translations/sq.po +1 -5
- package/lang/translations/sr-latn.po +1 -5
- package/lang/translations/sr.po +1 -5
- package/lang/translations/sv.po +1 -5
- package/lang/translations/th.po +1 -5
- package/lang/translations/ti.po +1 -5
- package/lang/translations/tk.po +1 -5
- package/lang/translations/tr.po +1 -5
- package/lang/translations/tt.po +1 -5
- package/lang/translations/ug.po +1 -5
- package/lang/translations/uk.po +1 -5
- package/lang/translations/ur.po +1 -5
- package/lang/translations/uz.po +1 -5
- package/lang/translations/vi.po +1 -5
- package/lang/translations/zh-cn.po +1 -5
- package/lang/translations/zh.po +1 -5
- package/package.json +28 -6
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -2
- package/src/legacyerrors.d.ts +1 -1
- package/src/legacyerrors.js +2 -2
- package/src/template.d.ts +1 -1
- package/src/template.js +2 -2
- package/src/templatecommand.d.ts +1 -1
- package/src/templatecommand.js +2 -2
- package/src/templateediting.d.ts +1 -1
- package/src/templateediting.js +2 -2
- package/src/templateui.d.ts +1 -1
- package/src/templateui.js +2 -2
- package/src/ui/templatelistbuttonview.d.ts +1 -1
- package/src/ui/templatelistbuttonview.js +2 -2
- package/src/ui/templatelistitemview.d.ts +1 -1
- package/src/ui/templatelistitemview.js +2 -2
- package/src/ui/templatelistview.d.ts +1 -1
- package/src/ui/templatelistview.js +2 -2
- package/src/utils/common-translations.d.ts +1 -1
- package/src/utils/common-translations.js +2 -2
- package/theme/template.css +1 -1
- package/dist/augmentation.d.ts +0 -27
- package/dist/index.d.ts +0 -17
- package/dist/legacyerrors.d.ts +0 -9
- package/dist/template.d.ts +0 -127
- package/dist/templatecommand.d.ts +0 -27
- package/dist/templateediting.d.ts +0 -34
- package/dist/templateui.d.ts +0 -41
- package/dist/ui/templatelistbuttonview.d.ts +0 -108
- package/dist/ui/templatelistitemview.d.ts +0 -38
- package/dist/ui/templatelistview.d.ts +0 -42
- package/dist/utils/common-translations.d.ts +0 -13
package/dist/augmentation.d.ts
DELETED
|
@@ -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';
|
package/dist/legacyerrors.d.ts
DELETED
|
@@ -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 {};
|
package/dist/template.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/templateui.d.ts
DELETED
|
@@ -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;
|