@ckeditor/ckeditor5-special-characters 36.0.0 → 37.0.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.
- package/build/special-characters.js +1 -1
- package/package.json +20 -15
- package/src/index.d.ts +14 -0
- package/src/index.js +0 -2
- package/src/specialcharacters.d.ts +101 -0
- package/src/specialcharacters.js +182 -330
- package/src/specialcharactersarrows.d.ts +35 -0
- package/src/specialcharactersarrows.js +46 -50
- package/src/specialcharactersconfig.d.ts +61 -0
- package/src/specialcharactersconfig.js +5 -0
- package/src/specialcharacterscurrency.d.ts +35 -0
- package/src/specialcharacterscurrency.js +60 -64
- package/src/specialcharactersessentials.d.ts +35 -0
- package/src/specialcharactersessentials.js +26 -24
- package/src/specialcharacterslatin.d.ts +35 -0
- package/src/specialcharacterslatin.js +152 -156
- package/src/specialcharactersmathematical.d.ts +35 -0
- package/src/specialcharactersmathematical.js +68 -72
- package/src/specialcharacterstext.d.ts +35 -0
- package/src/specialcharacterstext.js +51 -55
- package/src/ui/charactergridview.d.ts +53 -0
- package/src/ui/charactergridview.js +138 -186
- package/src/ui/characterinfoview.d.ts +35 -0
- package/src/ui/characterinfoview.js +58 -98
- package/src/ui/specialcharactersnavigationview.d.ts +59 -0
- package/src/ui/specialcharactersnavigationview.js +74 -121
- package/src/ui/specialcharactersview.d.ts +65 -0
- package/src/ui/specialcharactersview.js +60 -125
package/src/specialcharacters.js
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* @module special-characters/specialcharacters
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
8
|
import { Plugin } from 'ckeditor5/src/core';
|
|
11
9
|
import { Typing } from 'ckeditor5/src/typing';
|
|
12
10
|
import { createDropdown } from 'ckeditor5/src/ui';
|
|
@@ -15,341 +13,195 @@ import SpecialCharactersNavigationView from './ui/specialcharactersnavigationvie
|
|
|
15
13
|
import CharacterGridView from './ui/charactergridview';
|
|
16
14
|
import CharacterInfoView from './ui/characterinfoview';
|
|
17
15
|
import SpecialCharactersView from './ui/specialcharactersview';
|
|
18
|
-
|
|
19
16
|
import specialCharactersIcon from '../theme/icons/specialcharacters.svg';
|
|
17
|
+
import './specialcharactersconfig';
|
|
20
18
|
import '../theme/specialcharacters.css';
|
|
21
|
-
|
|
22
19
|
const ALL_SPECIAL_CHARACTERS_GROUP = 'All';
|
|
23
|
-
|
|
24
20
|
/**
|
|
25
21
|
* The special characters feature.
|
|
26
22
|
*
|
|
27
23
|
* Introduces the `'specialCharacters'` dropdown.
|
|
28
|
-
*
|
|
29
|
-
* @extends module:core/plugin~Plugin
|
|
30
24
|
*/
|
|
31
25
|
export default class SpecialCharacters extends Plugin {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
return this._characters.get( title );
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Returns a group of special characters. If the group with the specified name does not exist, it will be created.
|
|
218
|
-
*
|
|
219
|
-
* @private
|
|
220
|
-
* @param {String} groupName The name of the group to create.
|
|
221
|
-
* @param {String} label The label describing the new group.
|
|
222
|
-
*/
|
|
223
|
-
_getGroup( groupName, label ) {
|
|
224
|
-
if ( !this._groups.has( groupName ) ) {
|
|
225
|
-
this._groups.set( groupName, {
|
|
226
|
-
items: new Set(),
|
|
227
|
-
label
|
|
228
|
-
} );
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
return this._groups.get( groupName );
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Updates the symbol grid depending on the currently selected character group.
|
|
236
|
-
*
|
|
237
|
-
* @private
|
|
238
|
-
* @param {String} currentGroupName
|
|
239
|
-
* @param {module:special-characters/ui/charactergridview~CharacterGridView} gridView
|
|
240
|
-
*/
|
|
241
|
-
_updateGrid( currentGroupName, gridView ) {
|
|
242
|
-
// Updating the grid starts with removing all tiles belonging to the old group.
|
|
243
|
-
gridView.tiles.clear();
|
|
244
|
-
|
|
245
|
-
const characterTitles = this.getCharactersForGroup( currentGroupName );
|
|
246
|
-
|
|
247
|
-
for ( const title of characterTitles ) {
|
|
248
|
-
const character = this.getCharacter( title );
|
|
249
|
-
|
|
250
|
-
gridView.tiles.add( gridView.createTile( character, title ) );
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Initializes the dropdown, used for lazy loading.
|
|
256
|
-
*
|
|
257
|
-
* @private
|
|
258
|
-
* @param {module:utils/locale~Locale} locale
|
|
259
|
-
* @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
|
|
260
|
-
* @returns {Object} Returns an object with `navigationView`, `gridView` and `infoView` properties, containing UI parts.
|
|
261
|
-
*/
|
|
262
|
-
_createDropdownPanelContent( locale, dropdownView ) {
|
|
263
|
-
// The map contains a name of category (an identifier) and its label (a translational string).
|
|
264
|
-
const specialCharsGroups = new Map( [
|
|
265
|
-
// Add a special group that shows all available special characters.
|
|
266
|
-
[ ALL_SPECIAL_CHARACTERS_GROUP, this._allSpecialCharactersGroupLabel ],
|
|
267
|
-
|
|
268
|
-
...Array.from( this.getGroups() )
|
|
269
|
-
.map( name => ( [ name, this._groups.get( name ).label ] ) )
|
|
270
|
-
] );
|
|
271
|
-
|
|
272
|
-
const navigationView = new SpecialCharactersNavigationView( locale, specialCharsGroups );
|
|
273
|
-
const gridView = new CharacterGridView( locale );
|
|
274
|
-
const infoView = new CharacterInfoView( locale );
|
|
275
|
-
|
|
276
|
-
gridView.delegate( 'execute' ).to( dropdownView );
|
|
277
|
-
|
|
278
|
-
gridView.on( 'tileHover', ( evt, data ) => {
|
|
279
|
-
infoView.set( data );
|
|
280
|
-
} );
|
|
281
|
-
|
|
282
|
-
gridView.on( 'tileFocus', ( evt, data ) => {
|
|
283
|
-
infoView.set( data );
|
|
284
|
-
} );
|
|
285
|
-
|
|
286
|
-
// Update the grid of special characters when a user changed the character group.
|
|
287
|
-
navigationView.on( 'execute', () => {
|
|
288
|
-
this._updateGrid( navigationView.currentGroupName, gridView );
|
|
289
|
-
} );
|
|
290
|
-
|
|
291
|
-
// Set the initial content of the special characters grid.
|
|
292
|
-
this._updateGrid( navigationView.currentGroupName, gridView );
|
|
293
|
-
|
|
294
|
-
return { navigationView, gridView, infoView };
|
|
295
|
-
}
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get requires() {
|
|
30
|
+
return [Typing];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static get pluginName() {
|
|
36
|
+
return 'SpecialCharacters';
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
constructor(editor) {
|
|
42
|
+
super(editor);
|
|
43
|
+
const t = editor.t;
|
|
44
|
+
this._characters = new Map();
|
|
45
|
+
this._groups = new Map();
|
|
46
|
+
this._allSpecialCharactersGroupLabel = t('All');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
init() {
|
|
52
|
+
const editor = this.editor;
|
|
53
|
+
const t = editor.t;
|
|
54
|
+
const inputCommand = editor.commands.get('insertText');
|
|
55
|
+
// Add the `specialCharacters` dropdown button to feature components.
|
|
56
|
+
editor.ui.componentFactory.add('specialCharacters', locale => {
|
|
57
|
+
const dropdownView = createDropdown(locale);
|
|
58
|
+
let dropdownPanelContent;
|
|
59
|
+
dropdownView.buttonView.set({
|
|
60
|
+
label: t('Special characters'),
|
|
61
|
+
icon: specialCharactersIcon,
|
|
62
|
+
tooltip: true
|
|
63
|
+
});
|
|
64
|
+
dropdownView.bind('isEnabled').to(inputCommand);
|
|
65
|
+
// Insert a special character when a tile was clicked.
|
|
66
|
+
dropdownView.on('execute', (evt, data) => {
|
|
67
|
+
editor.execute('insertText', { text: data.character });
|
|
68
|
+
editor.editing.view.focus();
|
|
69
|
+
});
|
|
70
|
+
dropdownView.on('change:isOpen', () => {
|
|
71
|
+
if (!dropdownPanelContent) {
|
|
72
|
+
dropdownPanelContent = this._createDropdownPanelContent(locale, dropdownView);
|
|
73
|
+
const specialCharactersView = new SpecialCharactersView(locale, dropdownPanelContent.navigationView, dropdownPanelContent.gridView, dropdownPanelContent.infoView);
|
|
74
|
+
dropdownView.panelView.children.add(specialCharactersView);
|
|
75
|
+
}
|
|
76
|
+
dropdownPanelContent.infoView.set({
|
|
77
|
+
character: null,
|
|
78
|
+
name: null
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
return dropdownView;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Adds a collection of special characters to the specified group. The title of a special character must be unique.
|
|
86
|
+
*
|
|
87
|
+
* **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
|
|
88
|
+
* characters category.
|
|
89
|
+
*/
|
|
90
|
+
addItems(groupName, items, options = { label: groupName }) {
|
|
91
|
+
if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
|
|
92
|
+
/**
|
|
93
|
+
* The name "All" for a special category group cannot be used because it is a special category that displays all
|
|
94
|
+
* available special characters.
|
|
95
|
+
*
|
|
96
|
+
* @error special-character-invalid-group-name
|
|
97
|
+
*/
|
|
98
|
+
throw new CKEditorError('special-character-invalid-group-name', null);
|
|
99
|
+
}
|
|
100
|
+
const group = this._getGroup(groupName, options.label);
|
|
101
|
+
for (const item of items) {
|
|
102
|
+
group.items.add(item.title);
|
|
103
|
+
this._characters.set(item.title, item.character);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Returns special character groups in an order determined based on configuration and registration sequence.
|
|
108
|
+
*/
|
|
109
|
+
getGroups() {
|
|
110
|
+
const groups = Array.from(this._groups.keys());
|
|
111
|
+
const order = this.editor.config.get('specialCharacters.order') || [];
|
|
112
|
+
const invalidGroup = order.find(item => !groups.includes(item));
|
|
113
|
+
if (invalidGroup) {
|
|
114
|
+
/**
|
|
115
|
+
* One of the special character groups in the "specialCharacters.order" configuration doesn't exist.
|
|
116
|
+
*
|
|
117
|
+
* @error special-character-invalid-order-group-name
|
|
118
|
+
*/
|
|
119
|
+
throw new CKEditorError('special-character-invalid-order-group-name', null, { invalidGroup });
|
|
120
|
+
}
|
|
121
|
+
return new Set([
|
|
122
|
+
...order,
|
|
123
|
+
...groups
|
|
124
|
+
]);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Returns a collection of special characters symbol names (titles).
|
|
128
|
+
*/
|
|
129
|
+
getCharactersForGroup(groupName) {
|
|
130
|
+
if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
|
|
131
|
+
return new Set(this._characters.keys());
|
|
132
|
+
}
|
|
133
|
+
const group = this._groups.get(groupName);
|
|
134
|
+
if (group) {
|
|
135
|
+
return group.items;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
|
|
140
|
+
* is returned.
|
|
141
|
+
*
|
|
142
|
+
* @param title The title of a special character.
|
|
143
|
+
*/
|
|
144
|
+
getCharacter(title) {
|
|
145
|
+
return this._characters.get(title);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns a group of special characters. If the group with the specified name does not exist, it will be created.
|
|
149
|
+
*
|
|
150
|
+
* @param groupName The name of the group to create.
|
|
151
|
+
* @param label The label describing the new group.
|
|
152
|
+
*/
|
|
153
|
+
_getGroup(groupName, label) {
|
|
154
|
+
if (!this._groups.has(groupName)) {
|
|
155
|
+
this._groups.set(groupName, {
|
|
156
|
+
items: new Set(),
|
|
157
|
+
label
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return this._groups.get(groupName);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Updates the symbol grid depending on the currently selected character group.
|
|
164
|
+
*/
|
|
165
|
+
_updateGrid(currentGroupName, gridView) {
|
|
166
|
+
// Updating the grid starts with removing all tiles belonging to the old group.
|
|
167
|
+
gridView.tiles.clear();
|
|
168
|
+
const characterTitles = this.getCharactersForGroup(currentGroupName);
|
|
169
|
+
for (const title of characterTitles) {
|
|
170
|
+
const character = this.getCharacter(title);
|
|
171
|
+
gridView.tiles.add(gridView.createTile(character, title));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Initializes the dropdown, used for lazy loading.
|
|
176
|
+
*
|
|
177
|
+
* @returns An object with `navigationView`, `gridView` and `infoView` properties, containing UI parts.
|
|
178
|
+
*/
|
|
179
|
+
_createDropdownPanelContent(locale, dropdownView) {
|
|
180
|
+
const groupEntries = Array
|
|
181
|
+
.from(this.getGroups())
|
|
182
|
+
.map(name => ([name, this._groups.get(name).label]));
|
|
183
|
+
// The map contains a name of category (an identifier) and its label (a translational string).
|
|
184
|
+
const specialCharsGroups = new Map([
|
|
185
|
+
// Add a special group that shows all available special characters.
|
|
186
|
+
[ALL_SPECIAL_CHARACTERS_GROUP, this._allSpecialCharactersGroupLabel],
|
|
187
|
+
...groupEntries
|
|
188
|
+
]);
|
|
189
|
+
const navigationView = new SpecialCharactersNavigationView(locale, specialCharsGroups);
|
|
190
|
+
const gridView = new CharacterGridView(locale);
|
|
191
|
+
const infoView = new CharacterInfoView(locale);
|
|
192
|
+
gridView.delegate('execute').to(dropdownView);
|
|
193
|
+
gridView.on('tileHover', (evt, data) => {
|
|
194
|
+
infoView.set(data);
|
|
195
|
+
});
|
|
196
|
+
gridView.on('tileFocus', (evt, data) => {
|
|
197
|
+
infoView.set(data);
|
|
198
|
+
});
|
|
199
|
+
// Update the grid of special characters when a user changed the character group.
|
|
200
|
+
navigationView.on('execute', () => {
|
|
201
|
+
this._updateGrid(navigationView.currentGroupName, gridView);
|
|
202
|
+
});
|
|
203
|
+
// Set the initial content of the special characters grid.
|
|
204
|
+
this._updateGrid(navigationView.currentGroupName, gridView);
|
|
205
|
+
return { navigationView, gridView, infoView };
|
|
206
|
+
}
|
|
296
207
|
}
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* @typedef {Object} module:special-characters/specialcharacters~SpecialCharacterDefinition
|
|
300
|
-
*
|
|
301
|
-
* @property {String} title A unique name of the character (e.g. "greek small letter epsilon").
|
|
302
|
-
* @property {String} character A human-readable character displayed as the label (e.g. "ε").
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* The configuration of the {@link module:special-characters/specialcharacters~SpecialCharacters} feature.
|
|
307
|
-
*
|
|
308
|
-
* Read more in {@link module:special-characters/specialcharacters~SpecialCharactersConfig}.
|
|
309
|
-
*
|
|
310
|
-
* @member {module:special-characters/specialcharacters~SpecialCharactersConfig}
|
|
311
|
-
* module:core/editor/editorconfig~EditorConfig#specialCharacters
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* The configuration of the special characters feature.
|
|
316
|
-
*
|
|
317
|
-
* Read more about {@glink features/special-characters#configuration configuring the special characters feature}.
|
|
318
|
-
*
|
|
319
|
-
* ClassicEditor
|
|
320
|
-
* .create( editorElement, {
|
|
321
|
-
* specialCharacters: ... // Special characters feature options.
|
|
322
|
-
* } )
|
|
323
|
-
* .then( ... )
|
|
324
|
-
* .catch( ... );
|
|
325
|
-
*
|
|
326
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
|
|
327
|
-
*
|
|
328
|
-
* @interface SpecialCharactersConfig
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* The configuration of the special characters category order.
|
|
333
|
-
*
|
|
334
|
-
* Special characters categories are displayed in the UI in the order in which they were registered. Using the `order` property
|
|
335
|
-
* allows to override this behaviour and enforce specific order. Categories not listed in the `order` property will be displayed
|
|
336
|
-
* in the default order below categories listed in the configuration.
|
|
337
|
-
*
|
|
338
|
-
* ClassicEditor
|
|
339
|
-
* .create( editorElement, {
|
|
340
|
-
* plugins: [ SpecialCharacters, SpecialCharactersEssentials, ... ],
|
|
341
|
-
* specialCharacters: {
|
|
342
|
-
* order: [
|
|
343
|
-
* 'Text',
|
|
344
|
-
* 'Latin',
|
|
345
|
-
* 'Mathematical',
|
|
346
|
-
* 'Currency',
|
|
347
|
-
* 'Arrows'
|
|
348
|
-
* ]
|
|
349
|
-
* }
|
|
350
|
-
* } )
|
|
351
|
-
* .then( ... )
|
|
352
|
-
* .catch( ... );
|
|
353
|
-
*
|
|
354
|
-
* @member {Array.<String>} module:special-characters/specialcharacters~SpecialCharactersConfig#order
|
|
355
|
-
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
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 special-characters/specialcharactersarrows
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
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
|
+
*/
|
|
21
|
+
export default class SpecialCharactersArrows extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): 'SpecialCharactersArrows';
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
init(): void;
|
|
30
|
+
}
|
|
31
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
32
|
+
interface PluginsMap {
|
|
33
|
+
[SpecialCharactersArrows.pluginName]: SpecialCharactersArrows;
|
|
34
|
+
}
|
|
35
|
+
}
|