@ckeditor/ckeditor5-special-characters 0.0.0-internal-20241017.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +17 -0
- package/README.md +27 -0
- package/build/special-characters.js +5 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +78 -0
- package/dist/augmentation.d.ts +28 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +92 -0
- package/dist/index.css +124 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +1844 -0
- package/dist/index.js.map +1 -0
- package/dist/specialcharacters.d.ts +110 -0
- package/dist/specialcharactersarrows.d.ts +38 -0
- package/dist/specialcharactersconfig.d.ts +55 -0
- package/dist/specialcharacterscurrency.d.ts +38 -0
- package/dist/specialcharactersessentials.d.ts +43 -0
- package/dist/specialcharacterslatin.d.ts +38 -0
- package/dist/specialcharactersmathematical.d.ts +38 -0
- package/dist/specialcharacterstext.d.ts +38 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/ui/charactergridview.d.ts +98 -0
- package/dist/ui/characterinfoview.d.ts +39 -0
- package/dist/ui/specialcharacterscategoriesview.d.ts +45 -0
- package/dist/ui/specialcharactersview.d.ts +69 -0
- package/lang/contexts.json +267 -0
- package/lang/translations/ar.po +1080 -0
- package/lang/translations/az.po +1078 -0
- package/lang/translations/bg.po +1082 -0
- package/lang/translations/bn.po +1078 -0
- package/lang/translations/ca.po +1078 -0
- package/lang/translations/cs.po +1078 -0
- package/lang/translations/da.po +1078 -0
- package/lang/translations/de.po +1078 -0
- package/lang/translations/el.po +1078 -0
- package/lang/translations/en-au.po +1078 -0
- package/lang/translations/en.po +1078 -0
- package/lang/translations/es.po +1078 -0
- package/lang/translations/et.po +1078 -0
- package/lang/translations/fa.po +1078 -0
- package/lang/translations/fi.po +1078 -0
- package/lang/translations/fr.po +1078 -0
- package/lang/translations/gl.po +1078 -0
- package/lang/translations/he.po +1078 -0
- package/lang/translations/hi.po +1078 -0
- package/lang/translations/hr.po +1078 -0
- package/lang/translations/hu.po +1078 -0
- package/lang/translations/id.po +1078 -0
- package/lang/translations/it.po +1078 -0
- package/lang/translations/ja.po +1078 -0
- package/lang/translations/ko.po +1078 -0
- package/lang/translations/lt.po +1078 -0
- package/lang/translations/lv.po +1078 -0
- package/lang/translations/ms.po +1078 -0
- package/lang/translations/nl.po +1080 -0
- package/lang/translations/no.po +1080 -0
- package/lang/translations/pl.po +1078 -0
- package/lang/translations/pt-br.po +1078 -0
- package/lang/translations/pt.po +1078 -0
- package/lang/translations/ro.po +1078 -0
- package/lang/translations/ru.po +1078 -0
- package/lang/translations/sk.po +1078 -0
- package/lang/translations/sq.po +1078 -0
- package/lang/translations/sr-latn.po +1078 -0
- package/lang/translations/sr.po +1078 -0
- package/lang/translations/sv.po +1078 -0
- package/lang/translations/th.po +1078 -0
- package/lang/translations/ti.po +1078 -0
- package/lang/translations/tk.po +1078 -0
- package/lang/translations/tr.po +1078 -0
- package/lang/translations/ug.po +1078 -0
- package/lang/translations/uk.po +1078 -0
- package/lang/translations/ur.po +1078 -0
- package/lang/translations/uz.po +1078 -0
- package/lang/translations/vi.po +1078 -0
- package/lang/translations/zh-cn.po +1078 -0
- package/lang/translations/zh.po +1078 -0
- package/package.json +42 -0
- package/src/augmentation.d.ts +24 -0
- package/src/augmentation.js +5 -0
- package/src/index.d.ts +16 -0
- package/src/index.js +15 -0
- package/src/specialcharacters.d.ts +106 -0
- package/src/specialcharacters.js +235 -0
- package/src/specialcharactersarrows.d.ts +34 -0
- package/src/specialcharactersarrows.js +66 -0
- package/src/specialcharactersconfig.d.ts +51 -0
- package/src/specialcharactersconfig.js +5 -0
- package/src/specialcharacterscurrency.d.ts +34 -0
- package/src/specialcharacterscurrency.js +80 -0
- package/src/specialcharactersessentials.d.ts +39 -0
- package/src/specialcharactersessentials.js +51 -0
- package/src/specialcharacterslatin.d.ts +34 -0
- package/src/specialcharacterslatin.js +172 -0
- package/src/specialcharactersmathematical.d.ts +34 -0
- package/src/specialcharactersmathematical.js +88 -0
- package/src/specialcharacterstext.d.ts +34 -0
- package/src/specialcharacterstext.js +71 -0
- package/src/ui/charactergridview.d.ts +94 -0
- package/src/ui/charactergridview.js +129 -0
- package/src/ui/characterinfoview.d.ts +35 -0
- package/src/ui/characterinfoview.js +71 -0
- package/src/ui/specialcharacterscategoriesview.d.ts +41 -0
- package/src/ui/specialcharacterscategoriesview.js +94 -0
- package/src/ui/specialcharactersview.d.ts +65 -0
- package/src/ui/specialcharactersview.js +78 -0
- package/theme/charactergrid.css +12 -0
- package/theme/characterinfo.css +9 -0
- package/theme/icons/specialcharacters.svg +1 -0
- package/theme/specialcharacters.css +91 -0
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ckeditor/ckeditor5-special-characters",
|
|
3
|
+
"version": "0.0.0-internal-20241017.0",
|
|
4
|
+
"description": "Special characters feature for CKEditor 5.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ckeditor",
|
|
7
|
+
"ckeditor5",
|
|
8
|
+
"ckeditor 5",
|
|
9
|
+
"ckeditor5-feature",
|
|
10
|
+
"ckeditor5-plugin",
|
|
11
|
+
"ckeditor5-dll"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "src/index.js",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"ckeditor5": "0.0.0-internal-20241017.0",
|
|
17
|
+
"@ckeditor/ckeditor5-core": "0.0.0-internal-20241017.0",
|
|
18
|
+
"@ckeditor/ckeditor5-typing": "0.0.0-internal-20241017.0",
|
|
19
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-internal-20241017.0",
|
|
20
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-internal-20241017.0"
|
|
21
|
+
},
|
|
22
|
+
"author": "CKSource (http://cksource.com/)",
|
|
23
|
+
"license": "GPL-2.0-or-later",
|
|
24
|
+
"homepage": "https://ckeditor.com",
|
|
25
|
+
"bugs": "https://github.com/ckeditor/ckeditor5/issues",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/ckeditor/ckeditor5.git",
|
|
29
|
+
"directory": "packages/ckeditor5-special-characters"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"lang",
|
|
34
|
+
"src/**/*.js",
|
|
35
|
+
"src/**/*.d.ts",
|
|
36
|
+
"theme",
|
|
37
|
+
"build",
|
|
38
|
+
"ckeditor5-metadata.json",
|
|
39
|
+
"CHANGELOG.md"
|
|
40
|
+
],
|
|
41
|
+
"types": "src/index.d.ts"
|
|
42
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import type { SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, SpecialCharactersConfig } from './index.js';
|
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
7
|
+
interface PluginsMap {
|
|
8
|
+
[SpecialCharacters.pluginName]: SpecialCharacters;
|
|
9
|
+
[SpecialCharactersText.pluginName]: SpecialCharactersText;
|
|
10
|
+
[SpecialCharactersArrows.pluginName]: SpecialCharactersArrows;
|
|
11
|
+
[SpecialCharactersEssentials.pluginName]: SpecialCharactersEssentials;
|
|
12
|
+
[SpecialCharactersLatin.pluginName]: SpecialCharactersLatin;
|
|
13
|
+
[SpecialCharactersCurrency.pluginName]: SpecialCharactersCurrency;
|
|
14
|
+
[SpecialCharactersMathematical.pluginName]: SpecialCharactersMathematical;
|
|
15
|
+
}
|
|
16
|
+
interface EditorConfig {
|
|
17
|
+
/**
|
|
18
|
+
* The configuration of the {@link module:special-characters/specialcharacters~SpecialCharacters} feature.
|
|
19
|
+
*
|
|
20
|
+
* Read more in {@link module:special-characters/specialcharactersconfig~SpecialCharactersConfig}.
|
|
21
|
+
*/
|
|
22
|
+
specialCharacters?: SpecialCharactersConfig;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
* @module special-characters
|
|
7
|
+
*/
|
|
8
|
+
export { default as SpecialCharacters } from './specialcharacters.js';
|
|
9
|
+
export { default as SpecialCharactersArrows } from './specialcharactersarrows.js';
|
|
10
|
+
export { default as SpecialCharactersText } from './specialcharacterstext.js';
|
|
11
|
+
export { default as SpecialCharactersMathematical } from './specialcharactersmathematical.js';
|
|
12
|
+
export { default as SpecialCharactersLatin } from './specialcharacterslatin.js';
|
|
13
|
+
export { default as SpecialCharactersEssentials } from './specialcharactersessentials.js';
|
|
14
|
+
export { default as SpecialCharactersCurrency } from './specialcharacterscurrency.js';
|
|
15
|
+
export type { SpecialCharactersConfig } from './specialcharactersconfig.js';
|
|
16
|
+
import './augmentation.js';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
* @module special-characters
|
|
7
|
+
*/
|
|
8
|
+
export { default as SpecialCharacters } from './specialcharacters.js';
|
|
9
|
+
export { default as SpecialCharactersArrows } from './specialcharactersarrows.js';
|
|
10
|
+
export { default as SpecialCharactersText } from './specialcharacterstext.js';
|
|
11
|
+
export { default as SpecialCharactersMathematical } from './specialcharactersmathematical.js';
|
|
12
|
+
export { default as SpecialCharactersLatin } from './specialcharacterslatin.js';
|
|
13
|
+
export { default as SpecialCharactersEssentials } from './specialcharactersessentials.js';
|
|
14
|
+
export { default as SpecialCharactersCurrency } from './specialcharacterscurrency.js';
|
|
15
|
+
import './augmentation.js';
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
* @module special-characters/specialcharacters
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Typing } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import { Dialog } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import '../theme/specialcharacters.css';
|
|
12
|
+
/**
|
|
13
|
+
* The special characters feature.
|
|
14
|
+
*
|
|
15
|
+
* Introduces the `'specialCharacters'` dropdown.
|
|
16
|
+
*/
|
|
17
|
+
export default 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
|
+
*/
|
|
41
|
+
static get isOfficialPlugin(): true;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
constructor(editor: Editor);
|
|
46
|
+
/**
|
|
47
|
+
* @inheritDoc
|
|
48
|
+
*/
|
|
49
|
+
init(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Adds a collection of special characters to the specified group. The title of a special character must be unique.
|
|
52
|
+
*
|
|
53
|
+
* **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
|
|
54
|
+
* characters category.
|
|
55
|
+
*/
|
|
56
|
+
addItems(groupName: string, items: Array<SpecialCharacterDefinition>, options?: {
|
|
57
|
+
label: string;
|
|
58
|
+
}): void;
|
|
59
|
+
/**
|
|
60
|
+
* Returns special character groups in an order determined based on configuration and registration sequence.
|
|
61
|
+
*/
|
|
62
|
+
getGroups(): Set<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns a collection of special characters symbol names (titles).
|
|
65
|
+
*/
|
|
66
|
+
getCharactersForGroup(groupName: string): Set<string> | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
|
|
69
|
+
* is returned.
|
|
70
|
+
*
|
|
71
|
+
* @param title The title of a special character.
|
|
72
|
+
*/
|
|
73
|
+
getCharacter(title: string): string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Returns a group of special characters. If the group with the specified name does not exist, it will be created.
|
|
76
|
+
*
|
|
77
|
+
* @param groupName The name of the group to create.
|
|
78
|
+
* @param label The label describing the new group.
|
|
79
|
+
*/
|
|
80
|
+
private _getGroup;
|
|
81
|
+
/**
|
|
82
|
+
* Updates the symbol grid depending on the currently selected character group.
|
|
83
|
+
*/
|
|
84
|
+
private _updateGrid;
|
|
85
|
+
/**
|
|
86
|
+
* Initializes the dropdown, used for lazy loading.
|
|
87
|
+
*
|
|
88
|
+
* @returns An object with `categoriesView`, `gridView` and `infoView` properties, containing UI parts.
|
|
89
|
+
*/
|
|
90
|
+
private _createDropdownPanelContent;
|
|
91
|
+
/**
|
|
92
|
+
* Creates a button for toolbar and menu bar that will show special characters dialog.
|
|
93
|
+
*/
|
|
94
|
+
private _createDialogButton;
|
|
95
|
+
private _showDialog;
|
|
96
|
+
}
|
|
97
|
+
export interface SpecialCharacterDefinition {
|
|
98
|
+
/**
|
|
99
|
+
* A unique name of the character (e.g. "greek small letter epsilon").
|
|
100
|
+
*/
|
|
101
|
+
title: string;
|
|
102
|
+
/**
|
|
103
|
+
* A human-readable character displayed as the label (e.g. "ε").
|
|
104
|
+
*/
|
|
105
|
+
character: string;
|
|
106
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
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
|
+
* @module special-characters/specialcharacters
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { Typing } from 'ckeditor5/src/typing.js';
|
|
10
|
+
import { ButtonView, MenuBarMenuListItemButtonView, DialogViewPosition, Dialog } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import { CKEditorError } from 'ckeditor5/src/utils.js';
|
|
12
|
+
import CharacterGridView from './ui/charactergridview.js';
|
|
13
|
+
import CharacterInfoView from './ui/characterinfoview.js';
|
|
14
|
+
import SpecialCharactersView from './ui/specialcharactersview.js';
|
|
15
|
+
import specialCharactersIcon from '../theme/icons/specialcharacters.svg';
|
|
16
|
+
import '../theme/specialcharacters.css';
|
|
17
|
+
import SpecialCharactersCategoriesView from './ui/specialcharacterscategoriesview.js';
|
|
18
|
+
const ALL_SPECIAL_CHARACTERS_GROUP = 'All';
|
|
19
|
+
/**
|
|
20
|
+
* The special characters feature.
|
|
21
|
+
*
|
|
22
|
+
* Introduces the `'specialCharacters'` dropdown.
|
|
23
|
+
*/
|
|
24
|
+
export default class SpecialCharacters extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get requires() {
|
|
29
|
+
return [Typing, Dialog];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get pluginName() {
|
|
35
|
+
return 'SpecialCharacters';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
static get isOfficialPlugin() {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
constructor(editor) {
|
|
47
|
+
super(editor);
|
|
48
|
+
const t = editor.t;
|
|
49
|
+
this._characters = new Map();
|
|
50
|
+
this._groups = new Map();
|
|
51
|
+
this._allSpecialCharactersGroupLabel = t('All');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
init() {
|
|
57
|
+
const editor = this.editor;
|
|
58
|
+
editor.ui.componentFactory.add('specialCharacters', () => {
|
|
59
|
+
const button = this._createDialogButton(ButtonView);
|
|
60
|
+
button.set({
|
|
61
|
+
tooltip: true
|
|
62
|
+
});
|
|
63
|
+
return button;
|
|
64
|
+
});
|
|
65
|
+
editor.ui.componentFactory.add('menuBar:specialCharacters', () => {
|
|
66
|
+
return this._createDialogButton(MenuBarMenuListItemButtonView);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Adds a collection of special characters to the specified group. The title of a special character must be unique.
|
|
71
|
+
*
|
|
72
|
+
* **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
|
|
73
|
+
* characters category.
|
|
74
|
+
*/
|
|
75
|
+
addItems(groupName, items, options = { label: groupName }) {
|
|
76
|
+
if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
|
|
77
|
+
/**
|
|
78
|
+
* The name "All" for a special category group cannot be used because it is a special category that displays all
|
|
79
|
+
* available special characters.
|
|
80
|
+
*
|
|
81
|
+
* @error special-character-invalid-group-name
|
|
82
|
+
*/
|
|
83
|
+
throw new CKEditorError('special-character-invalid-group-name', null);
|
|
84
|
+
}
|
|
85
|
+
const group = this._getGroup(groupName, options.label);
|
|
86
|
+
for (const item of items) {
|
|
87
|
+
group.items.add(item.title);
|
|
88
|
+
this._characters.set(item.title, item.character);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns special character groups in an order determined based on configuration and registration sequence.
|
|
93
|
+
*/
|
|
94
|
+
getGroups() {
|
|
95
|
+
const groups = Array.from(this._groups.keys());
|
|
96
|
+
const order = this.editor.config.get('specialCharacters.order') || [];
|
|
97
|
+
const invalidGroup = order.find(item => !groups.includes(item));
|
|
98
|
+
if (invalidGroup) {
|
|
99
|
+
/**
|
|
100
|
+
* One of the special character groups in the "specialCharacters.order" configuration doesn't exist.
|
|
101
|
+
*
|
|
102
|
+
* @error special-character-invalid-order-group-name
|
|
103
|
+
*/
|
|
104
|
+
throw new CKEditorError('special-character-invalid-order-group-name', null, { invalidGroup });
|
|
105
|
+
}
|
|
106
|
+
return new Set([
|
|
107
|
+
...order,
|
|
108
|
+
...groups
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns a collection of special characters symbol names (titles).
|
|
113
|
+
*/
|
|
114
|
+
getCharactersForGroup(groupName) {
|
|
115
|
+
if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
|
|
116
|
+
return new Set(this._characters.keys());
|
|
117
|
+
}
|
|
118
|
+
const group = this._groups.get(groupName);
|
|
119
|
+
if (group) {
|
|
120
|
+
return group.items;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
|
|
125
|
+
* is returned.
|
|
126
|
+
*
|
|
127
|
+
* @param title The title of a special character.
|
|
128
|
+
*/
|
|
129
|
+
getCharacter(title) {
|
|
130
|
+
return this._characters.get(title);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Returns a group of special characters. If the group with the specified name does not exist, it will be created.
|
|
134
|
+
*
|
|
135
|
+
* @param groupName The name of the group to create.
|
|
136
|
+
* @param label The label describing the new group.
|
|
137
|
+
*/
|
|
138
|
+
_getGroup(groupName, label) {
|
|
139
|
+
if (!this._groups.has(groupName)) {
|
|
140
|
+
this._groups.set(groupName, {
|
|
141
|
+
items: new Set(),
|
|
142
|
+
label
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return this._groups.get(groupName);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Updates the symbol grid depending on the currently selected character group.
|
|
149
|
+
*/
|
|
150
|
+
_updateGrid(currentGroupName, gridView) {
|
|
151
|
+
// Updating the grid starts with removing all tiles belonging to the old group.
|
|
152
|
+
gridView.tiles.clear();
|
|
153
|
+
const characterTitles = this.getCharactersForGroup(currentGroupName);
|
|
154
|
+
for (const title of characterTitles) {
|
|
155
|
+
const character = this.getCharacter(title);
|
|
156
|
+
gridView.tiles.add(gridView.createTile(character, title));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Initializes the dropdown, used for lazy loading.
|
|
161
|
+
*
|
|
162
|
+
* @returns An object with `categoriesView`, `gridView` and `infoView` properties, containing UI parts.
|
|
163
|
+
*/
|
|
164
|
+
_createDropdownPanelContent(locale) {
|
|
165
|
+
const groupEntries = Array
|
|
166
|
+
.from(this.getGroups())
|
|
167
|
+
.map(name => ([name, this._groups.get(name).label]));
|
|
168
|
+
// The map contains a name of category (an identifier) and its label (a translational string).
|
|
169
|
+
const specialCharsGroups = new Map([
|
|
170
|
+
// Add a special group that shows all available special characters.
|
|
171
|
+
[ALL_SPECIAL_CHARACTERS_GROUP, this._allSpecialCharactersGroupLabel],
|
|
172
|
+
...groupEntries
|
|
173
|
+
]);
|
|
174
|
+
const categoriesView = new SpecialCharactersCategoriesView(locale, specialCharsGroups);
|
|
175
|
+
const gridView = new CharacterGridView(locale);
|
|
176
|
+
const infoView = new CharacterInfoView(locale);
|
|
177
|
+
gridView.on('tileHover', (evt, data) => {
|
|
178
|
+
infoView.set(data);
|
|
179
|
+
});
|
|
180
|
+
gridView.on('tileFocus', (evt, data) => {
|
|
181
|
+
infoView.set(data);
|
|
182
|
+
});
|
|
183
|
+
// Update the grid of special characters when a user changed the character group.
|
|
184
|
+
categoriesView.on('change:currentGroupName', (evt, propertyName, newValue) => {
|
|
185
|
+
this._updateGrid(newValue, gridView);
|
|
186
|
+
});
|
|
187
|
+
// Set the initial content of the special characters grid.
|
|
188
|
+
this._updateGrid(categoriesView.currentGroupName, gridView);
|
|
189
|
+
return { categoriesView, gridView, infoView };
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Creates a button for toolbar and menu bar that will show special characters dialog.
|
|
193
|
+
*/
|
|
194
|
+
_createDialogButton(ButtonClass) {
|
|
195
|
+
const editor = this.editor;
|
|
196
|
+
const locale = editor.locale;
|
|
197
|
+
const buttonView = new ButtonClass(editor.locale);
|
|
198
|
+
const command = editor.commands.get('insertText');
|
|
199
|
+
const t = locale.t;
|
|
200
|
+
const dialogPlugin = this.editor.plugins.get('Dialog');
|
|
201
|
+
buttonView.set({
|
|
202
|
+
label: t('Special characters'),
|
|
203
|
+
icon: specialCharactersIcon,
|
|
204
|
+
isToggleable: true
|
|
205
|
+
});
|
|
206
|
+
buttonView.bind('isOn').to(dialogPlugin, 'id', id => id === 'specialCharacters');
|
|
207
|
+
buttonView.bind('isEnabled').to(command, 'isEnabled');
|
|
208
|
+
buttonView.on('execute', () => {
|
|
209
|
+
if (dialogPlugin.id === 'specialCharacters') {
|
|
210
|
+
dialogPlugin.hide();
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
this._showDialog();
|
|
214
|
+
});
|
|
215
|
+
return buttonView;
|
|
216
|
+
}
|
|
217
|
+
_showDialog() {
|
|
218
|
+
const editor = this.editor;
|
|
219
|
+
const dialog = editor.plugins.get('Dialog');
|
|
220
|
+
const locale = editor.locale;
|
|
221
|
+
const t = locale.t;
|
|
222
|
+
const { categoriesView, gridView, infoView } = this._createDropdownPanelContent(locale);
|
|
223
|
+
const content = new SpecialCharactersView(locale, categoriesView, gridView, infoView);
|
|
224
|
+
gridView.on('execute', (evt, data) => {
|
|
225
|
+
editor.execute('insertText', { text: data.character });
|
|
226
|
+
});
|
|
227
|
+
dialog.show({
|
|
228
|
+
id: 'specialCharacters',
|
|
229
|
+
title: t('Special characters'),
|
|
230
|
+
className: 'ck-special-characters',
|
|
231
|
+
content,
|
|
232
|
+
position: DialogViewPosition.EDITOR_TOP_SIDE
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
* @module special-characters/specialcharactersarrows
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
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
|
+
static get isOfficialPlugin(): true;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
* @module special-characters/specialcharactersarrows
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
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() {
|
|
26
|
+
return 'SpecialCharactersArrows';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get isOfficialPlugin() {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init() {
|
|
38
|
+
const editor = this.editor;
|
|
39
|
+
const t = editor.t;
|
|
40
|
+
const plugin = editor.plugins.get('SpecialCharacters');
|
|
41
|
+
plugin.addItems('Arrows', [
|
|
42
|
+
{ title: t('leftwards simple arrow'), character: '←' },
|
|
43
|
+
{ title: t('rightwards simple arrow'), character: '→' },
|
|
44
|
+
{ title: t('upwards simple arrow'), character: '↑' },
|
|
45
|
+
{ title: t('downwards simple arrow'), character: '↓' },
|
|
46
|
+
{ title: t('leftwards double arrow'), character: '⇐' },
|
|
47
|
+
{ title: t('rightwards double arrow'), character: '⇒' },
|
|
48
|
+
{ title: t('upwards double arrow'), character: '⇑' },
|
|
49
|
+
{ title: t('downwards double arrow'), character: '⇓' },
|
|
50
|
+
{ title: t('leftwards dashed arrow'), character: '⇠' },
|
|
51
|
+
{ title: t('rightwards dashed arrow'), character: '⇢' },
|
|
52
|
+
{ title: t('upwards dashed arrow'), character: '⇡' },
|
|
53
|
+
{ title: t('downwards dashed arrow'), character: '⇣' },
|
|
54
|
+
{ title: t('leftwards arrow to bar'), character: '⇤' },
|
|
55
|
+
{ title: t('rightwards arrow to bar'), character: '⇥' },
|
|
56
|
+
{ title: t('upwards arrow to bar'), character: '⤒' },
|
|
57
|
+
{ title: t('downwards arrow to bar'), character: '⤓' },
|
|
58
|
+
{ title: t('up down arrow with base'), character: '↨' },
|
|
59
|
+
{ title: t('back with leftwards arrow above'), character: '🔙' },
|
|
60
|
+
{ title: t('end with leftwards arrow above'), character: '🔚' },
|
|
61
|
+
{ title: t('on with exclamation mark with left right arrow above'), character: '🔛' },
|
|
62
|
+
{ title: t('soon with rightwards arrow above'), character: '🔜' },
|
|
63
|
+
{ title: t('top with upwards arrow above'), character: '🔝' }
|
|
64
|
+
], { label: t('Arrows') });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
* @module special-characters/specialcharactersconfig
|
|
7
|
+
*/
|
|
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( editorElement, {
|
|
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
|
+
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( editorElement, {
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
* @module special-characters/specialcharacterscurrency
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
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
|
+
*/
|
|
21
|
+
export default 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;
|
|
34
|
+
}
|