@ckeditor/ckeditor5-special-characters 48.2.0 → 48.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,115 +1,115 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharacters
7
- */
8
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
9
- import { Typing } from '@ckeditor/ckeditor5-typing';
10
- import { Dialog } from '@ckeditor/ckeditor5-ui';
11
- import '../theme/specialcharacters.css';
6
+ * @module special-characters/specialcharacters
7
+ */
8
+ import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { Typing } from "@ckeditor/ckeditor5-typing";
10
+ import { Dialog } from "@ckeditor/ckeditor5-ui";
11
+ import "../theme/specialcharacters.css";
12
12
  /**
13
- * The special characters feature.
14
- *
15
- * Introduces the `'specialCharacters'` dropdown.
16
- */
13
+ * The special characters feature.
14
+ *
15
+ * Introduces the `'specialCharacters'` dropdown.
16
+ */
17
17
  export declare class SpecialCharacters extends Plugin {
18
- /**
19
- * Registered characters. A pair of a character name and its symbol.
20
- */
21
- private _characters;
22
- /**
23
- * Registered groups. Each group contains a displayed label and a collection with symbol names.
24
- */
25
- private _groups;
26
- /**
27
- * A label describing the "All" special characters category.
28
- */
29
- private _allSpecialCharactersGroupLabel;
30
- /**
31
- * @inheritDoc
32
- */
33
- static get requires(): readonly [typeof Typing, typeof Dialog];
34
- /**
35
- * @inheritDoc
36
- */
37
- static get pluginName(): "SpecialCharacters";
38
- /**
39
- * @inheritDoc
40
- * @internal
41
- */
42
- static get licenseFeatureCode(): string;
43
- /**
44
- * @inheritDoc
45
- */
46
- static get isOfficialPlugin(): true;
47
- /**
48
- * @inheritDoc
49
- */
50
- static get isPremiumPlugin(): true;
51
- /**
52
- * @inheritDoc
53
- */
54
- constructor(editor: Editor);
55
- /**
56
- * @inheritDoc
57
- */
58
- init(): void;
59
- /**
60
- * Adds a collection of special characters to the specified group. The title of a special character must be unique.
61
- *
62
- * **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
63
- * characters category.
64
- */
65
- addItems(groupName: string, items: Array<SpecialCharacterDefinition>, options?: {
66
- label: string;
67
- }): void;
68
- /**
69
- * Returns special character groups in an order determined based on configuration and registration sequence.
70
- */
71
- getGroups(): Set<string>;
72
- /**
73
- * Returns a collection of special characters symbol names (titles).
74
- */
75
- getCharactersForGroup(groupName: string): Set<string> | undefined;
76
- /**
77
- * Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
78
- * is returned.
79
- *
80
- * @param title The title of a special character.
81
- */
82
- getCharacter(title: string): string | undefined;
83
- /**
84
- * Returns a group of special characters. If the group with the specified name does not exist, it will be created.
85
- *
86
- * @param groupName The name of the group to create.
87
- * @param label The label describing the new group.
88
- */
89
- private _getGroup;
90
- /**
91
- * Updates the symbol grid depending on the currently selected character group.
92
- */
93
- private _updateGrid;
94
- /**
95
- * Initializes the dropdown, used for lazy loading.
96
- *
97
- * @returns An object with `categoriesView`, `gridView` and `infoView` properties, containing UI parts.
98
- */
99
- private _createDropdownPanelContent;
100
- /**
101
- * Creates a button for toolbar and menu bar that will show special characters dialog.
102
- */
103
- private _createDialogButton;
104
- private _showDialog;
18
+ /**
19
+ * Registered characters. A pair of a character name and its symbol.
20
+ */
21
+ private _characters;
22
+ /**
23
+ * Registered groups. Each group contains a displayed label and a collection with symbol names.
24
+ */
25
+ private _groups;
26
+ /**
27
+ * A label describing the "All" special characters category.
28
+ */
29
+ private _allSpecialCharactersGroupLabel;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get requires(): PluginDependenciesOf<[Typing, Dialog]>;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static get pluginName(): "SpecialCharacters";
38
+ /**
39
+ * @inheritDoc
40
+ * @internal
41
+ */
42
+ static get licenseFeatureCode(): string;
43
+ /**
44
+ * @inheritDoc
45
+ */
46
+ static override get isOfficialPlugin(): true;
47
+ /**
48
+ * @inheritDoc
49
+ */
50
+ static override get isPremiumPlugin(): true;
51
+ /**
52
+ * @inheritDoc
53
+ */
54
+ constructor(editor: Editor);
55
+ /**
56
+ * @inheritDoc
57
+ */
58
+ init(): void;
59
+ /**
60
+ * Adds a collection of special characters to the specified group. The title of a special character must be unique.
61
+ *
62
+ * **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
63
+ * characters category.
64
+ */
65
+ addItems(groupName: string, items: Array<SpecialCharacterDefinition>, options?: {
66
+ label: string;
67
+ }): void;
68
+ /**
69
+ * Returns special character groups in an order determined based on configuration and registration sequence.
70
+ */
71
+ getGroups(): Set<string>;
72
+ /**
73
+ * Returns a collection of special characters symbol names (titles).
74
+ */
75
+ getCharactersForGroup(groupName: string): Set<string> | undefined;
76
+ /**
77
+ * Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
78
+ * is returned.
79
+ *
80
+ * @param title The title of a special character.
81
+ */
82
+ getCharacter(title: string): string | undefined;
83
+ /**
84
+ * Returns a group of special characters. If the group with the specified name does not exist, it will be created.
85
+ *
86
+ * @param groupName The name of the group to create.
87
+ * @param label The label describing the new group.
88
+ */
89
+ private _getGroup;
90
+ /**
91
+ * Updates the symbol grid depending on the currently selected character group.
92
+ */
93
+ private _updateGrid;
94
+ /**
95
+ * Initializes the dropdown, used for lazy loading.
96
+ *
97
+ * @returns An object with `categoriesView`, `gridView` and `infoView` properties, containing UI parts.
98
+ */
99
+ private _createDropdownPanelContent;
100
+ /**
101
+ * Creates a button for toolbar and menu bar that will show special characters dialog.
102
+ */
103
+ private _createDialogButton;
104
+ private _showDialog;
105
105
  }
106
106
  export interface SpecialCharacterDefinition {
107
- /**
108
- * A unique name of the character (e.g. "greek small letter epsilon").
109
- */
110
- title: string;
111
- /**
112
- * A human-readable character displayed as the label (e.g. "ε").
113
- */
114
- character: string;
107
+ /**
108
+ * A unique name of the character (e.g. "greek small letter epsilon").
109
+ */
110
+ title: string;
111
+ /**
112
+ * A human-readable character displayed as the label (e.g. "ε").
113
+ */
114
+ character: string;
115
115
  }
@@ -1,34 +1,34 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharactersarrows
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module special-characters/specialcharactersarrows
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * A plugin that provides special characters for the "Arrows" category.
11
- *
12
- * ```ts
13
- * ClassicEditor
14
- * .create( {
15
- * plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
16
- * } )
17
- * .then( ... )
18
- * .catch( ... );
19
- * ```
20
- */
10
+ * A plugin that provides special characters for the "Arrows" category.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ */
21
21
  export declare class SpecialCharactersArrows extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "SpecialCharactersArrows";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
30
- /**
31
- * @inheritDoc
32
- */
33
- init(): void;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "SpecialCharactersArrows";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static override get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ init(): void;
34
34
  }
@@ -1,51 +1,51 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharactersconfig
7
- */
6
+ * @module special-characters/specialcharactersconfig
7
+ */
8
8
  /**
9
- * The configuration of the special characters feature.
10
- *
11
- * Read more about {@glink features/special-characters#configuration configuring the special characters feature}.
12
- *
13
- * ```ts
14
- * ClassicEditor
15
- * .create( {
16
- * specialCharacters: ... // Special characters feature options.
17
- * } )
18
- * .then( ... )
19
- * .catch( ... );
20
- * ```
21
- *
22
- * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
23
- */
9
+ * The configuration of the special characters feature.
10
+ *
11
+ * Read more about {@glink features/special-characters#configuration configuring the special characters feature}.
12
+ *
13
+ * ```ts
14
+ * ClassicEditor
15
+ * .create( {
16
+ * specialCharacters: ... // Special characters feature options.
17
+ * } )
18
+ * .then( ... )
19
+ * .catch( ... );
20
+ * ```
21
+ *
22
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
23
+ */
24
24
  export interface SpecialCharactersConfig {
25
- /**
26
- * The configuration of the special characters category order.
27
- *
28
- * Special characters categories are displayed in the UI in the order in which they were registered. Using the `order` property
29
- * allows to override this behaviour and enforce specific order. Categories not listed in the `order` property will be displayed
30
- * in the default order below categories listed in the configuration.
31
- *
32
- * ```ts
33
- * ClassicEditor
34
- * .create( {
35
- * plugins: [ SpecialCharacters, SpecialCharactersEssentials, ... ],
36
- * specialCharacters: {
37
- * order: [
38
- * 'Text',
39
- * 'Latin',
40
- * 'Mathematical',
41
- * 'Currency',
42
- * 'Arrows'
43
- * ]
44
- * }
45
- * } )
46
- * .then( ... )
47
- * .catch( ... );
48
- * ```
49
- */
50
- order?: Array<string>;
25
+ /**
26
+ * The configuration of the special characters category order.
27
+ *
28
+ * Special characters categories are displayed in the UI in the order in which they were registered. Using the `order` property
29
+ * allows to override this behaviour and enforce specific order. Categories not listed in the `order` property will be displayed
30
+ * in the default order below categories listed in the configuration.
31
+ *
32
+ * ```ts
33
+ * ClassicEditor
34
+ * .create( {
35
+ * plugins: [ SpecialCharacters, SpecialCharactersEssentials, ... ],
36
+ * specialCharacters: {
37
+ * order: [
38
+ * 'Text',
39
+ * 'Latin',
40
+ * 'Mathematical',
41
+ * 'Currency',
42
+ * 'Arrows'
43
+ * ]
44
+ * }
45
+ * } )
46
+ * .then( ... )
47
+ * .catch( ... );
48
+ * ```
49
+ */
50
+ order?: Array<string>;
51
51
  }
@@ -1,34 +1,34 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharacterscurrency
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module special-characters/specialcharacterscurrency
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * A plugin that provides special characters for the "Currency" category.
11
- *
12
- * ```ts
13
- * ClassicEditor
14
- * .create( {
15
- * plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
16
- * } )
17
- * .then( ... )
18
- * .catch( ... );
19
- * ```
20
- */
10
+ * A plugin that provides special characters for the "Currency" category.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ */
21
21
  export declare class SpecialCharactersCurrency extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "SpecialCharactersCurrency";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
30
- /**
31
- * @inheritDoc
32
- */
33
- init(): void;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "SpecialCharactersCurrency";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static override get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ init(): void;
34
34
  }
@@ -1,39 +1,39 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharactersessentials
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { SpecialCharactersCurrency } from './specialcharacterscurrency.js';
10
- import { SpecialCharactersMathematical } from './specialcharactersmathematical.js';
11
- import { SpecialCharactersArrows } from './specialcharactersarrows.js';
12
- import { SpecialCharactersLatin } from './specialcharacterslatin.js';
13
- import { SpecialCharactersText } from './specialcharacterstext.js';
6
+ * @module special-characters/specialcharactersessentials
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { SpecialCharactersCurrency } from "./specialcharacterscurrency.js";
10
+ import { SpecialCharactersMathematical } from "./specialcharactersmathematical.js";
11
+ import { SpecialCharactersArrows } from "./specialcharactersarrows.js";
12
+ import { SpecialCharactersLatin } from "./specialcharacterslatin.js";
13
+ import { SpecialCharactersText } from "./specialcharacterstext.js";
14
14
  /**
15
- * A plugin combining a basic set of characters for the special characters plugin.
16
- *
17
- * ```ts
18
- * ClassicEditor
19
- * .create( {
20
- * plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
21
- * } )
22
- * .then( ... )
23
- * .catch( ... );
24
- * ```
25
- */
15
+ * A plugin combining a basic set of characters for the special characters plugin.
16
+ *
17
+ * ```ts
18
+ * ClassicEditor
19
+ * .create( {
20
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
21
+ * } )
22
+ * .then( ... )
23
+ * .catch( ... );
24
+ * ```
25
+ */
26
26
  export declare class SpecialCharactersEssentials extends Plugin {
27
- /**
28
- * @inheritDoc
29
- */
30
- static get pluginName(): "SpecialCharactersEssentials";
31
- /**
32
- * @inheritDoc
33
- */
34
- static get isOfficialPlugin(): true;
35
- /**
36
- * @inheritDoc
37
- */
38
- static get requires(): readonly [typeof SpecialCharactersCurrency, typeof SpecialCharactersText, typeof SpecialCharactersMathematical, typeof SpecialCharactersArrows, typeof SpecialCharactersLatin];
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get pluginName(): "SpecialCharactersEssentials";
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static override get isOfficialPlugin(): true;
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ static get requires(): PluginDependenciesOf<[SpecialCharactersCurrency, SpecialCharactersText, SpecialCharactersMathematical, SpecialCharactersArrows, SpecialCharactersLatin]>;
39
39
  }
@@ -1,34 +1,34 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharacterslatin
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module special-characters/specialcharacterslatin
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * A plugin that provides special characters for the "Latin" category.
11
- *
12
- * ```ts
13
- * ClassicEditor
14
- * .create( {
15
- * plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
16
- * } )
17
- * .then( ... )
18
- * .catch( ... );
19
- * ```
20
- */
10
+ * A plugin that provides special characters for the "Latin" category.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ */
21
21
  export declare class SpecialCharactersLatin extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "SpecialCharactersLatin";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
30
- /**
31
- * @inheritDoc
32
- */
33
- init(): void;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "SpecialCharactersLatin";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static override get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ init(): void;
34
34
  }
@@ -1,34 +1,34 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module special-characters/specialcharactersmathematical
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module special-characters/specialcharactersmathematical
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * A plugin that provides special characters for the "Mathematical" category.
11
- *
12
- * ```ts
13
- * ClassicEditor
14
- * .create( {
15
- * plugins: [ ..., SpecialCharacters, SpecialCharactersMathematical ],
16
- * } )
17
- * .then( ... )
18
- * .catch( ... );
19
- * ```
20
- */
10
+ * A plugin that provides special characters for the "Mathematical" category.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersMathematical ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ */
21
21
  export declare class SpecialCharactersMathematical extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "SpecialCharactersMathematical";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
30
- /**
31
- * @inheritDoc
32
- */
33
- init(): void;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "SpecialCharactersMathematical";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static override get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ init(): void;
34
34
  }