@ckeditor/ckeditor5-template 40.0.0 → 40.2.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/LICENSE.md +2 -2
- package/README.md +1 -1
- package/build/template.js +1 -1
- package/build/translations/sr-latn.js +1 -0
- package/lang/translations/sr-latn.po +38 -0
- package/package.json +3 -3
- 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 -38
- package/src/ui/templatelistview.js +1 -1
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 _0x194b=['pluginName','requires','Template'];(function(_0xb6a160,_0x194bbe){var _0x42dcf2=function(_0x16b9b3){while(--_0x16b9b3){_0xb6a160['push'](_0xb6a160['shift']());}};_0x42dcf2(++_0x194bbe);}(_0x194b,0x93));var _0x42dc=function(_0xb6a160,_0x194bbe){_0xb6a160=_0xb6a160-0x0;var _0x42dcf2=_0x194b[_0xb6a160];return _0x42dcf2;};import{Plugin as _0x52be1b}from'ckeditor5/src/core';import _0x166b7e from'./templateediting';import _0x3c72e3 from'./templateui';export default class o extends _0x52be1b{static get[_0x42dc('0x1')](){return[_0x166b7e,_0x3c72e3];}static get[_0x42dc('0x0')](){return _0x42dc('0x2');}}
|
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 _0x2bee=['string','htmlProcessor','insertContent','execute','function','data','toView','editor','change','toModel'];(function(_0x5cfbf1,_0x2beeed){const _0x114ba8=function(_0x23572f){while(--_0x23572f){_0x5cfbf1['push'](_0x5cfbf1['shift']());}};_0x114ba8(++_0x2beeed);}(_0x2bee,0x1ea));const _0x114b=function(_0x5cfbf1,_0x2beeed){_0x5cfbf1=_0x5cfbf1-0x0;let _0x114ba8=_0x2bee[_0x5cfbf1];return _0x114ba8;};import{Command as _0x496401}from'ckeditor5/src/core';export default class c extends _0x496401{[_0x114b('0x3')](_0x48a868){const {model:_0x17f3a2}=this[_0x114b('0x7')];let _0x53f26d;switch(typeof _0x48a868){case _0x114b('0x0'):_0x53f26d=_0x48a868;break;case _0x114b('0x4'):_0x53f26d=_0x48a868();}_0x114b('0x0')==typeof _0x53f26d&&_0x17f3a2[_0x114b('0x8')](()=>{const _0x4827ec=this['editor'][_0x114b('0x5')][_0x114b('0x1')][_0x114b('0x6')](_0x53f26d),_0x13db66=this[_0x114b('0x7')][_0x114b('0x5')][_0x114b('0x9')](_0x4827ec);_0x17f3a2[_0x114b('0x2')](_0x13db66);});}}
|
package/src/templateediting.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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/templateediting
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
/**
|
|
10
|
-
* The template editing plugin.
|
|
11
|
-
*/
|
|
12
|
-
export default class TemplateEditing extends Plugin {
|
|
13
|
-
licenseKey: string;
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
static get pluginName(): "TemplateEditing";
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
constructor(editor: Editor);
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
init(): void;
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
destroy(): void;
|
|
30
|
-
}
|
|
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/templateediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
+
/**
|
|
10
|
+
* The template editing plugin.
|
|
11
|
+
*/
|
|
12
|
+
export default class TemplateEditing extends Plugin {
|
|
13
|
+
licenseKey: string;
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get pluginName(): "TemplateEditing";
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
constructor(editor: Editor);
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
init(): void;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
destroy(): void;
|
|
30
|
+
}
|
package/src/templateediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x463c=['config','templateLicenseKeyTrial','commands','insertTemplate','destroy','templateLicenseKeyValid','template-invalid-license-key','_licenseKeyCheckInterval','pluginName','editor','TemplateEditing','templateLicenseKeyTrialLimit:operations','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20template\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','templateLicenseKeyInvalid','get'];(function(_0x27e3d6,_0x463cce){const _0x180894=function(_0x299401){while(--_0x299401){_0x27e3d6['push'](_0x27e3d6['shift']());}};_0x180894(++_0x463cce);}(_0x463c,0x10b));const _0x1808=function(_0x27e3d6,_0x463cce){_0x27e3d6=_0x27e3d6-0x0;let _0x180894=_0x463c[_0x27e3d6];return _0x180894;};import{Plugin as _0xea7302}from'ckeditor5/src/core';import{CKEditorError as _0x51dd4d}from'ckeditor5/src/utils';import _0x1c22f from'./templatecommand';export default class i extends _0xea7302{static get[_0x1808('0xb')](){return _0x1808('0xd');}constructor(_0xf7376c){super(_0xf7376c),this['_licenseKeyCheckInterval']=null;}['init'](){const {editor:_0x1036aa}=this;_0x1036aa[_0x1808('0x5')]['add'](_0x1808('0x6'),new _0x1c22f(_0x1036aa)),this['licenseKey']=_0x1036aa[_0x1808('0x3')][_0x1808('0x2')]('licenseKey');const _0x9fa7a=this[_0x1808('0xc')];this[_0x1808('0xa')]=setInterval(()=>{let _0x547585;for(const _0x486ab6 in _0x9fa7a){const _0x364a43=_0x486ab6,_0x56b338=_0x9fa7a[_0x364a43];if('templateLicenseKeyTrial'===_0x56b338||_0x1808('0x1')===_0x56b338||_0x1808('0x8')===_0x56b338||_0x1808('0xe')===_0x56b338){delete _0x9fa7a[_0x364a43],_0x547585=_0x56b338;break;}}if(_0x1808('0x1')===_0x547585)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x51dd4d(_0x1808('0x9'),null);if(_0x1808('0x4')===_0x547585&&console['info'](_0x1808('0x0')),_0x1808('0xe')===_0x547585)throw clearInterval(this[_0x1808('0xa')]),new _0x51dd4d('template-trial-license-key-reached-limit-changes',null);_0x1808('0x8')===_0x547585&&clearInterval(this[_0x1808('0xa')]);},0x3e8);}[_0x1808('0x7')](){this[_0x1808('0xa')]&&clearInterval(this[_0x1808('0xa')]);}}
|
package/src/templateui.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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/templateui
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import '../theme/template.css';
|
|
10
|
-
/**
|
|
11
|
-
* The UI plugin of the template feature.
|
|
12
|
-
*
|
|
13
|
-
* It registers the `'insertTemplate'` UI dropdown in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
|
|
14
|
-
* that displays a list of templates and allows to insert them into the editor content.
|
|
15
|
-
*/
|
|
16
|
-
export default class TemplateUI extends Plugin {
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
static get pluginName(): "TemplateUI";
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
init(): void;
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
afterInit(): void;
|
|
29
|
-
}
|
|
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/templateui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import '../theme/template.css';
|
|
10
|
+
/**
|
|
11
|
+
* The UI plugin of the template feature.
|
|
12
|
+
*
|
|
13
|
+
* It registers the `'insertTemplate'` UI dropdown in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
|
|
14
|
+
* that displays a list of templates and allows to insert them into the editor content.
|
|
15
|
+
*/
|
|
16
|
+
export default class TemplateUI extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "TemplateUI";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
init(): void;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
afterInit(): void;
|
|
29
|
+
}
|