@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.
Files changed (313) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +17 -0
  3. package/README.md +27 -0
  4. package/build/special-characters.js +5 -0
  5. package/build/translations/ar.js +1 -0
  6. package/build/translations/az.js +1 -0
  7. package/build/translations/bg.js +1 -0
  8. package/build/translations/bn.js +1 -0
  9. package/build/translations/ca.js +1 -0
  10. package/build/translations/cs.js +1 -0
  11. package/build/translations/da.js +1 -0
  12. package/build/translations/de.js +1 -0
  13. package/build/translations/el.js +1 -0
  14. package/build/translations/en-au.js +1 -0
  15. package/build/translations/es.js +1 -0
  16. package/build/translations/et.js +1 -0
  17. package/build/translations/fa.js +1 -0
  18. package/build/translations/fi.js +1 -0
  19. package/build/translations/fr.js +1 -0
  20. package/build/translations/gl.js +1 -0
  21. package/build/translations/he.js +1 -0
  22. package/build/translations/hi.js +1 -0
  23. package/build/translations/hr.js +1 -0
  24. package/build/translations/hu.js +1 -0
  25. package/build/translations/id.js +1 -0
  26. package/build/translations/it.js +1 -0
  27. package/build/translations/ja.js +1 -0
  28. package/build/translations/ko.js +1 -0
  29. package/build/translations/lt.js +1 -0
  30. package/build/translations/lv.js +1 -0
  31. package/build/translations/ms.js +1 -0
  32. package/build/translations/nl.js +1 -0
  33. package/build/translations/no.js +1 -0
  34. package/build/translations/pl.js +1 -0
  35. package/build/translations/pt-br.js +1 -0
  36. package/build/translations/pt.js +1 -0
  37. package/build/translations/ro.js +1 -0
  38. package/build/translations/ru.js +1 -0
  39. package/build/translations/sk.js +1 -0
  40. package/build/translations/sq.js +1 -0
  41. package/build/translations/sr-latn.js +1 -0
  42. package/build/translations/sr.js +1 -0
  43. package/build/translations/sv.js +1 -0
  44. package/build/translations/th.js +1 -0
  45. package/build/translations/ti.js +1 -0
  46. package/build/translations/tk.js +1 -0
  47. package/build/translations/tr.js +1 -0
  48. package/build/translations/ug.js +1 -0
  49. package/build/translations/uk.js +1 -0
  50. package/build/translations/ur.js +1 -0
  51. package/build/translations/uz.js +1 -0
  52. package/build/translations/vi.js +1 -0
  53. package/build/translations/zh-cn.js +1 -0
  54. package/build/translations/zh.js +1 -0
  55. package/ckeditor5-metadata.json +78 -0
  56. package/dist/augmentation.d.ts +28 -0
  57. package/dist/index-content.css +4 -0
  58. package/dist/index-editor.css +92 -0
  59. package/dist/index.css +124 -0
  60. package/dist/index.css.map +1 -0
  61. package/dist/index.d.ts +20 -0
  62. package/dist/index.js +1844 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/specialcharacters.d.ts +110 -0
  65. package/dist/specialcharactersarrows.d.ts +38 -0
  66. package/dist/specialcharactersconfig.d.ts +55 -0
  67. package/dist/specialcharacterscurrency.d.ts +38 -0
  68. package/dist/specialcharactersessentials.d.ts +43 -0
  69. package/dist/specialcharacterslatin.d.ts +38 -0
  70. package/dist/specialcharactersmathematical.d.ts +38 -0
  71. package/dist/specialcharacterstext.d.ts +38 -0
  72. package/dist/translations/ar.d.ts +8 -0
  73. package/dist/translations/ar.js +5 -0
  74. package/dist/translations/ar.umd.js +11 -0
  75. package/dist/translations/az.d.ts +8 -0
  76. package/dist/translations/az.js +5 -0
  77. package/dist/translations/az.umd.js +11 -0
  78. package/dist/translations/bg.d.ts +8 -0
  79. package/dist/translations/bg.js +5 -0
  80. package/dist/translations/bg.umd.js +11 -0
  81. package/dist/translations/bn.d.ts +8 -0
  82. package/dist/translations/bn.js +5 -0
  83. package/dist/translations/bn.umd.js +11 -0
  84. package/dist/translations/ca.d.ts +8 -0
  85. package/dist/translations/ca.js +5 -0
  86. package/dist/translations/ca.umd.js +11 -0
  87. package/dist/translations/cs.d.ts +8 -0
  88. package/dist/translations/cs.js +5 -0
  89. package/dist/translations/cs.umd.js +11 -0
  90. package/dist/translations/da.d.ts +8 -0
  91. package/dist/translations/da.js +5 -0
  92. package/dist/translations/da.umd.js +11 -0
  93. package/dist/translations/de.d.ts +8 -0
  94. package/dist/translations/de.js +5 -0
  95. package/dist/translations/de.umd.js +11 -0
  96. package/dist/translations/el.d.ts +8 -0
  97. package/dist/translations/el.js +5 -0
  98. package/dist/translations/el.umd.js +11 -0
  99. package/dist/translations/en-au.d.ts +8 -0
  100. package/dist/translations/en-au.js +5 -0
  101. package/dist/translations/en-au.umd.js +11 -0
  102. package/dist/translations/en.d.ts +8 -0
  103. package/dist/translations/en.js +5 -0
  104. package/dist/translations/en.umd.js +11 -0
  105. package/dist/translations/es.d.ts +8 -0
  106. package/dist/translations/es.js +5 -0
  107. package/dist/translations/es.umd.js +11 -0
  108. package/dist/translations/et.d.ts +8 -0
  109. package/dist/translations/et.js +5 -0
  110. package/dist/translations/et.umd.js +11 -0
  111. package/dist/translations/fa.d.ts +8 -0
  112. package/dist/translations/fa.js +5 -0
  113. package/dist/translations/fa.umd.js +11 -0
  114. package/dist/translations/fi.d.ts +8 -0
  115. package/dist/translations/fi.js +5 -0
  116. package/dist/translations/fi.umd.js +11 -0
  117. package/dist/translations/fr.d.ts +8 -0
  118. package/dist/translations/fr.js +5 -0
  119. package/dist/translations/fr.umd.js +11 -0
  120. package/dist/translations/gl.d.ts +8 -0
  121. package/dist/translations/gl.js +5 -0
  122. package/dist/translations/gl.umd.js +11 -0
  123. package/dist/translations/he.d.ts +8 -0
  124. package/dist/translations/he.js +5 -0
  125. package/dist/translations/he.umd.js +11 -0
  126. package/dist/translations/hi.d.ts +8 -0
  127. package/dist/translations/hi.js +5 -0
  128. package/dist/translations/hi.umd.js +11 -0
  129. package/dist/translations/hr.d.ts +8 -0
  130. package/dist/translations/hr.js +5 -0
  131. package/dist/translations/hr.umd.js +11 -0
  132. package/dist/translations/hu.d.ts +8 -0
  133. package/dist/translations/hu.js +5 -0
  134. package/dist/translations/hu.umd.js +11 -0
  135. package/dist/translations/id.d.ts +8 -0
  136. package/dist/translations/id.js +5 -0
  137. package/dist/translations/id.umd.js +11 -0
  138. package/dist/translations/it.d.ts +8 -0
  139. package/dist/translations/it.js +5 -0
  140. package/dist/translations/it.umd.js +11 -0
  141. package/dist/translations/ja.d.ts +8 -0
  142. package/dist/translations/ja.js +5 -0
  143. package/dist/translations/ja.umd.js +11 -0
  144. package/dist/translations/ko.d.ts +8 -0
  145. package/dist/translations/ko.js +5 -0
  146. package/dist/translations/ko.umd.js +11 -0
  147. package/dist/translations/lt.d.ts +8 -0
  148. package/dist/translations/lt.js +5 -0
  149. package/dist/translations/lt.umd.js +11 -0
  150. package/dist/translations/lv.d.ts +8 -0
  151. package/dist/translations/lv.js +5 -0
  152. package/dist/translations/lv.umd.js +11 -0
  153. package/dist/translations/ms.d.ts +8 -0
  154. package/dist/translations/ms.js +5 -0
  155. package/dist/translations/ms.umd.js +11 -0
  156. package/dist/translations/nl.d.ts +8 -0
  157. package/dist/translations/nl.js +5 -0
  158. package/dist/translations/nl.umd.js +11 -0
  159. package/dist/translations/no.d.ts +8 -0
  160. package/dist/translations/no.js +5 -0
  161. package/dist/translations/no.umd.js +11 -0
  162. package/dist/translations/pl.d.ts +8 -0
  163. package/dist/translations/pl.js +5 -0
  164. package/dist/translations/pl.umd.js +11 -0
  165. package/dist/translations/pt-br.d.ts +8 -0
  166. package/dist/translations/pt-br.js +5 -0
  167. package/dist/translations/pt-br.umd.js +11 -0
  168. package/dist/translations/pt.d.ts +8 -0
  169. package/dist/translations/pt.js +5 -0
  170. package/dist/translations/pt.umd.js +11 -0
  171. package/dist/translations/ro.d.ts +8 -0
  172. package/dist/translations/ro.js +5 -0
  173. package/dist/translations/ro.umd.js +11 -0
  174. package/dist/translations/ru.d.ts +8 -0
  175. package/dist/translations/ru.js +5 -0
  176. package/dist/translations/ru.umd.js +11 -0
  177. package/dist/translations/sk.d.ts +8 -0
  178. package/dist/translations/sk.js +5 -0
  179. package/dist/translations/sk.umd.js +11 -0
  180. package/dist/translations/sq.d.ts +8 -0
  181. package/dist/translations/sq.js +5 -0
  182. package/dist/translations/sq.umd.js +11 -0
  183. package/dist/translations/sr-latn.d.ts +8 -0
  184. package/dist/translations/sr-latn.js +5 -0
  185. package/dist/translations/sr-latn.umd.js +11 -0
  186. package/dist/translations/sr.d.ts +8 -0
  187. package/dist/translations/sr.js +5 -0
  188. package/dist/translations/sr.umd.js +11 -0
  189. package/dist/translations/sv.d.ts +8 -0
  190. package/dist/translations/sv.js +5 -0
  191. package/dist/translations/sv.umd.js +11 -0
  192. package/dist/translations/th.d.ts +8 -0
  193. package/dist/translations/th.js +5 -0
  194. package/dist/translations/th.umd.js +11 -0
  195. package/dist/translations/ti.d.ts +8 -0
  196. package/dist/translations/ti.js +5 -0
  197. package/dist/translations/ti.umd.js +11 -0
  198. package/dist/translations/tk.d.ts +8 -0
  199. package/dist/translations/tk.js +5 -0
  200. package/dist/translations/tk.umd.js +11 -0
  201. package/dist/translations/tr.d.ts +8 -0
  202. package/dist/translations/tr.js +5 -0
  203. package/dist/translations/tr.umd.js +11 -0
  204. package/dist/translations/ug.d.ts +8 -0
  205. package/dist/translations/ug.js +5 -0
  206. package/dist/translations/ug.umd.js +11 -0
  207. package/dist/translations/uk.d.ts +8 -0
  208. package/dist/translations/uk.js +5 -0
  209. package/dist/translations/uk.umd.js +11 -0
  210. package/dist/translations/ur.d.ts +8 -0
  211. package/dist/translations/ur.js +5 -0
  212. package/dist/translations/ur.umd.js +11 -0
  213. package/dist/translations/uz.d.ts +8 -0
  214. package/dist/translations/uz.js +5 -0
  215. package/dist/translations/uz.umd.js +11 -0
  216. package/dist/translations/vi.d.ts +8 -0
  217. package/dist/translations/vi.js +5 -0
  218. package/dist/translations/vi.umd.js +11 -0
  219. package/dist/translations/zh-cn.d.ts +8 -0
  220. package/dist/translations/zh-cn.js +5 -0
  221. package/dist/translations/zh-cn.umd.js +11 -0
  222. package/dist/translations/zh.d.ts +8 -0
  223. package/dist/translations/zh.js +5 -0
  224. package/dist/translations/zh.umd.js +11 -0
  225. package/dist/ui/charactergridview.d.ts +98 -0
  226. package/dist/ui/characterinfoview.d.ts +39 -0
  227. package/dist/ui/specialcharacterscategoriesview.d.ts +45 -0
  228. package/dist/ui/specialcharactersview.d.ts +69 -0
  229. package/lang/contexts.json +267 -0
  230. package/lang/translations/ar.po +1080 -0
  231. package/lang/translations/az.po +1078 -0
  232. package/lang/translations/bg.po +1082 -0
  233. package/lang/translations/bn.po +1078 -0
  234. package/lang/translations/ca.po +1078 -0
  235. package/lang/translations/cs.po +1078 -0
  236. package/lang/translations/da.po +1078 -0
  237. package/lang/translations/de.po +1078 -0
  238. package/lang/translations/el.po +1078 -0
  239. package/lang/translations/en-au.po +1078 -0
  240. package/lang/translations/en.po +1078 -0
  241. package/lang/translations/es.po +1078 -0
  242. package/lang/translations/et.po +1078 -0
  243. package/lang/translations/fa.po +1078 -0
  244. package/lang/translations/fi.po +1078 -0
  245. package/lang/translations/fr.po +1078 -0
  246. package/lang/translations/gl.po +1078 -0
  247. package/lang/translations/he.po +1078 -0
  248. package/lang/translations/hi.po +1078 -0
  249. package/lang/translations/hr.po +1078 -0
  250. package/lang/translations/hu.po +1078 -0
  251. package/lang/translations/id.po +1078 -0
  252. package/lang/translations/it.po +1078 -0
  253. package/lang/translations/ja.po +1078 -0
  254. package/lang/translations/ko.po +1078 -0
  255. package/lang/translations/lt.po +1078 -0
  256. package/lang/translations/lv.po +1078 -0
  257. package/lang/translations/ms.po +1078 -0
  258. package/lang/translations/nl.po +1080 -0
  259. package/lang/translations/no.po +1080 -0
  260. package/lang/translations/pl.po +1078 -0
  261. package/lang/translations/pt-br.po +1078 -0
  262. package/lang/translations/pt.po +1078 -0
  263. package/lang/translations/ro.po +1078 -0
  264. package/lang/translations/ru.po +1078 -0
  265. package/lang/translations/sk.po +1078 -0
  266. package/lang/translations/sq.po +1078 -0
  267. package/lang/translations/sr-latn.po +1078 -0
  268. package/lang/translations/sr.po +1078 -0
  269. package/lang/translations/sv.po +1078 -0
  270. package/lang/translations/th.po +1078 -0
  271. package/lang/translations/ti.po +1078 -0
  272. package/lang/translations/tk.po +1078 -0
  273. package/lang/translations/tr.po +1078 -0
  274. package/lang/translations/ug.po +1078 -0
  275. package/lang/translations/uk.po +1078 -0
  276. package/lang/translations/ur.po +1078 -0
  277. package/lang/translations/uz.po +1078 -0
  278. package/lang/translations/vi.po +1078 -0
  279. package/lang/translations/zh-cn.po +1078 -0
  280. package/lang/translations/zh.po +1078 -0
  281. package/package.json +42 -0
  282. package/src/augmentation.d.ts +24 -0
  283. package/src/augmentation.js +5 -0
  284. package/src/index.d.ts +16 -0
  285. package/src/index.js +15 -0
  286. package/src/specialcharacters.d.ts +106 -0
  287. package/src/specialcharacters.js +235 -0
  288. package/src/specialcharactersarrows.d.ts +34 -0
  289. package/src/specialcharactersarrows.js +66 -0
  290. package/src/specialcharactersconfig.d.ts +51 -0
  291. package/src/specialcharactersconfig.js +5 -0
  292. package/src/specialcharacterscurrency.d.ts +34 -0
  293. package/src/specialcharacterscurrency.js +80 -0
  294. package/src/specialcharactersessentials.d.ts +39 -0
  295. package/src/specialcharactersessentials.js +51 -0
  296. package/src/specialcharacterslatin.d.ts +34 -0
  297. package/src/specialcharacterslatin.js +172 -0
  298. package/src/specialcharactersmathematical.d.ts +34 -0
  299. package/src/specialcharactersmathematical.js +88 -0
  300. package/src/specialcharacterstext.d.ts +34 -0
  301. package/src/specialcharacterstext.js +71 -0
  302. package/src/ui/charactergridview.d.ts +94 -0
  303. package/src/ui/charactergridview.js +129 -0
  304. package/src/ui/characterinfoview.d.ts +35 -0
  305. package/src/ui/characterinfoview.js +71 -0
  306. package/src/ui/specialcharacterscategoriesview.d.ts +41 -0
  307. package/src/ui/specialcharacterscategoriesview.js +94 -0
  308. package/src/ui/specialcharactersview.d.ts +65 -0
  309. package/src/ui/specialcharactersview.js +78 -0
  310. package/theme/charactergrid.css +12 -0
  311. package/theme/characterinfo.css +9 -0
  312. package/theme/icons/specialcharacters.svg +1 -0
  313. package/theme/specialcharacters.css +91 -0
package/dist/index.js ADDED
@@ -0,0 +1,1844 @@
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 { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
6
+ import { Typing } from '@ckeditor/ckeditor5-typing/dist/index.js';
7
+ import { View, addKeyboardHandlingForGrid, ButtonView, FocusCycler, LabeledFieldView, createLabeledDropdown, ViewModel, addListToDropdown, Dialog, MenuBarMenuListItemButtonView, DialogViewPosition } from '@ckeditor/ckeditor5-ui/dist/index.js';
8
+ import { FocusTracker, KeystrokeHandler, global, Collection, CKEditorError } from '@ckeditor/ckeditor5-utils/dist/index.js';
9
+
10
+ /**
11
+ * A grid of character tiles. It allows browsing special characters and selecting the character to
12
+ * be inserted into the content.
13
+ */ class CharacterGridView extends View {
14
+ /**
15
+ * A collection of the child tile views. Each tile represents a particular character.
16
+ */ tiles;
17
+ /**
18
+ * Tracks information about the DOM focus in the grid.
19
+ */ focusTracker;
20
+ /**
21
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
22
+ */ keystrokes;
23
+ /**
24
+ * Creates an instance of a character grid containing tiles representing special characters.
25
+ *
26
+ * @param locale The localization services instance.
27
+ */ constructor(locale){
28
+ super(locale);
29
+ this.tiles = this.createCollection();
30
+ this.setTemplate({
31
+ tag: 'div',
32
+ children: [
33
+ {
34
+ tag: 'div',
35
+ attributes: {
36
+ class: [
37
+ 'ck',
38
+ 'ck-character-grid__tiles'
39
+ ]
40
+ },
41
+ children: this.tiles
42
+ }
43
+ ],
44
+ attributes: {
45
+ class: [
46
+ 'ck',
47
+ 'ck-character-grid'
48
+ ]
49
+ }
50
+ });
51
+ this.focusTracker = new FocusTracker();
52
+ this.keystrokes = new KeystrokeHandler();
53
+ addKeyboardHandlingForGrid({
54
+ keystrokeHandler: this.keystrokes,
55
+ focusTracker: this.focusTracker,
56
+ gridItems: this.tiles,
57
+ numberOfColumns: ()=>global.window.getComputedStyle(this.element.firstChild) // Responsive .ck-character-grid__tiles
58
+ .getPropertyValue('grid-template-columns').split(' ').length,
59
+ uiLanguageDirection: this.locale && this.locale.uiLanguageDirection
60
+ });
61
+ }
62
+ /**
63
+ * Creates a new tile for the grid.
64
+ *
65
+ * @param character A human-readable character displayed as the label (e.g. "ε").
66
+ * @param name The name of the character (e.g. "greek small letter epsilon").
67
+ */ createTile(character, name) {
68
+ const tile = new ButtonView(this.locale);
69
+ tile.set({
70
+ label: character,
71
+ withText: true,
72
+ class: 'ck-character-grid__tile'
73
+ });
74
+ // Labels are vital for the users to understand what character they're looking at.
75
+ // For now we're using native title attribute for that, see #5817.
76
+ tile.extendTemplate({
77
+ attributes: {
78
+ title: name
79
+ },
80
+ on: {
81
+ mouseover: tile.bindTemplate.to('mouseover'),
82
+ focus: tile.bindTemplate.to('focus')
83
+ }
84
+ });
85
+ tile.on('mouseover', ()=>{
86
+ this.fire('tileHover', {
87
+ name,
88
+ character
89
+ });
90
+ });
91
+ tile.on('focus', ()=>{
92
+ this.fire('tileFocus', {
93
+ name,
94
+ character
95
+ });
96
+ });
97
+ tile.on('execute', ()=>{
98
+ this.fire('execute', {
99
+ name,
100
+ character
101
+ });
102
+ });
103
+ return tile;
104
+ }
105
+ /**
106
+ * @inheritDoc
107
+ */ render() {
108
+ super.render();
109
+ for (const item of this.tiles){
110
+ this.focusTracker.add(item.element);
111
+ }
112
+ this.tiles.on('change', (eventInfo, { added, removed })=>{
113
+ if (added.length > 0) {
114
+ for (const item of added){
115
+ this.focusTracker.add(item.element);
116
+ }
117
+ }
118
+ if (removed.length > 0) {
119
+ for (const item of removed){
120
+ this.focusTracker.remove(item.element);
121
+ }
122
+ }
123
+ });
124
+ this.keystrokes.listenTo(this.element);
125
+ }
126
+ /**
127
+ * @inheritDoc
128
+ */ destroy() {
129
+ super.destroy();
130
+ this.keystrokes.destroy();
131
+ }
132
+ /**
133
+ * Focuses the first focusable in {@link ~CharacterGridView#tiles}.
134
+ */ focus() {
135
+ this.tiles.first.focus();
136
+ }
137
+ }
138
+
139
+ /**
140
+ * The view displaying detailed information about a special character glyph, e.g. upon
141
+ * hovering it with a mouse.
142
+ */ class CharacterInfoView extends View {
143
+ constructor(locale){
144
+ super(locale);
145
+ const bind = this.bindTemplate;
146
+ this.set('character', null);
147
+ this.set('name', null);
148
+ this.bind('code').to(this, 'character', characterToUnicodeString);
149
+ this.setTemplate({
150
+ tag: 'div',
151
+ children: [
152
+ {
153
+ tag: 'span',
154
+ attributes: {
155
+ class: [
156
+ 'ck-character-info__name'
157
+ ]
158
+ },
159
+ children: [
160
+ {
161
+ // Note: ZWSP to prevent vertical collapsing.
162
+ text: bind.to('name', (name)=>name ? name : '\u200B')
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ tag: 'span',
168
+ attributes: {
169
+ class: [
170
+ 'ck-character-info__code'
171
+ ]
172
+ },
173
+ children: [
174
+ {
175
+ text: bind.to('code')
176
+ }
177
+ ]
178
+ }
179
+ ],
180
+ attributes: {
181
+ class: [
182
+ 'ck',
183
+ 'ck-character-info'
184
+ ]
185
+ }
186
+ });
187
+ }
188
+ }
189
+ /**
190
+ * Converts a character into a "Unicode string", for instance:
191
+ *
192
+ * "$" -> "U+0024"
193
+ *
194
+ * Returns an empty string when the character is `null`.
195
+ */ function characterToUnicodeString(character) {
196
+ if (character === null) {
197
+ return '';
198
+ }
199
+ const hexCode = character.codePointAt(0).toString(16);
200
+ return 'U+' + ('0000' + hexCode).slice(-4);
201
+ }
202
+
203
+ /**
204
+ * A view that glues pieces of the special characters dropdown panel together:
205
+ *
206
+ * * the navigation view (allows selecting the category),
207
+ * * the grid view (displays characters as a grid),
208
+ * * and the info view (displays detailed info about a specific character).
209
+ */ class SpecialCharactersView extends View {
210
+ /**
211
+ * A collection of the focusable children of the view.
212
+ */ items;
213
+ /**
214
+ * Tracks information about the DOM focus in the view.
215
+ */ focusTracker;
216
+ /**
217
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
218
+ */ keystrokes;
219
+ /**
220
+ * Helps cycling over focusable {@link #items} in the view.
221
+ */ _focusCycler;
222
+ /**
223
+ * An instance of the `SpecialCharactersCategoriesView`.
224
+ */ categoriesView;
225
+ /**
226
+ * An instance of the `CharacterGridView`.
227
+ */ gridView;
228
+ /**
229
+ * An instance of the `CharacterInfoView`.
230
+ */ infoView;
231
+ /**
232
+ * Creates an instance of the `SpecialCharactersView`.
233
+ */ constructor(locale, categoriesView, gridView, infoView){
234
+ super(locale);
235
+ this.categoriesView = categoriesView;
236
+ this.gridView = gridView;
237
+ this.infoView = infoView;
238
+ this.items = this.createCollection();
239
+ this.focusTracker = new FocusTracker();
240
+ this.keystrokes = new KeystrokeHandler();
241
+ this._focusCycler = new FocusCycler({
242
+ focusables: this.items,
243
+ focusTracker: this.focusTracker,
244
+ keystrokeHandler: this.keystrokes,
245
+ actions: {
246
+ focusPrevious: 'shift + tab',
247
+ focusNext: 'tab'
248
+ }
249
+ });
250
+ this.setTemplate({
251
+ tag: 'div',
252
+ children: [
253
+ this.categoriesView,
254
+ this.gridView,
255
+ this.infoView
256
+ ],
257
+ attributes: {
258
+ // Avoid focus loss when the user clicks the area of the grid that is not a button.
259
+ // https://github.com/ckeditor/ckeditor5/pull/12319#issuecomment-1231779819
260
+ tabindex: '-1'
261
+ }
262
+ });
263
+ this.items.add(this.categoriesView);
264
+ this.items.add(this.gridView);
265
+ }
266
+ /**
267
+ * @inheritDoc
268
+ */ render() {
269
+ super.render();
270
+ this.focusTracker.add(this.categoriesView.element);
271
+ this.focusTracker.add(this.gridView.element);
272
+ // Start listening for the keystrokes coming from #element.
273
+ this.keystrokes.listenTo(this.element);
274
+ }
275
+ /**
276
+ * @inheritDoc
277
+ */ destroy() {
278
+ super.destroy();
279
+ this.focusTracker.destroy();
280
+ this.keystrokes.destroy();
281
+ }
282
+ /**
283
+ * Focuses the first focusable in {@link #items}.
284
+ */ focus() {
285
+ this._focusCycler.focusFirst();
286
+ }
287
+ }
288
+
289
+ var specialCharactersIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z\"/></svg>";
290
+
291
+ /**
292
+ * A class representing the navigation part of the special characters UI. It is responsible
293
+ * for describing the feature and allowing the user to select a particular character group.
294
+ */ class SpecialCharactersCategoriesView extends View {
295
+ _groupNames;
296
+ _dropdownView;
297
+ /**
298
+ * Creates an instance of the {@link module:special-characters/ui/specialcharacterscategoriesview~SpecialCharactersCategoriesView}
299
+ * class.
300
+ *
301
+ * @param locale The localization services instance.
302
+ * @param groupNames The names of the character groups.
303
+ */ constructor(locale, groupNames){
304
+ super(locale);
305
+ this.set('currentGroupName', Array.from(groupNames.entries())[0][0]);
306
+ this._groupNames = groupNames;
307
+ this._dropdownView = new LabeledFieldView(locale, createLabeledDropdown);
308
+ this.setTemplate({
309
+ tag: 'div',
310
+ attributes: {
311
+ class: [
312
+ 'ck',
313
+ 'ck-character-categories'
314
+ ]
315
+ },
316
+ children: [
317
+ this._dropdownView
318
+ ]
319
+ });
320
+ }
321
+ /**
322
+ * @inheritDoc
323
+ */ render() {
324
+ super.render();
325
+ this._setupDropdown();
326
+ }
327
+ /**
328
+ * @inheritDoc
329
+ */ focus() {
330
+ this._dropdownView.focus();
331
+ }
332
+ /**
333
+ * Creates dropdown item list, sets up bindings and fills properties.
334
+ */ _setupDropdown() {
335
+ const items = new Collection();
336
+ for (const [name, label] of this._groupNames){
337
+ const item = {
338
+ type: 'button',
339
+ model: new ViewModel({
340
+ name,
341
+ label,
342
+ role: 'menuitemradio',
343
+ withText: true
344
+ })
345
+ };
346
+ item.model.bind('isOn').to(this, 'currentGroupName', (value)=>{
347
+ return value === name;
348
+ });
349
+ items.add(item);
350
+ }
351
+ const t = this.locale.t;
352
+ const accessibleLabel = t('Category');
353
+ this._dropdownView.set({
354
+ label: accessibleLabel,
355
+ isEmpty: false
356
+ });
357
+ this._dropdownView.fieldView.panelPosition = this.locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';
358
+ this._dropdownView.fieldView.buttonView.set({
359
+ withText: true,
360
+ tooltip: accessibleLabel,
361
+ ariaLabel: accessibleLabel,
362
+ ariaLabelledBy: undefined,
363
+ isOn: false
364
+ });
365
+ this._dropdownView.fieldView.buttonView.bind('label').to(this, 'currentGroupName', (value)=>this._groupNames.get(value));
366
+ this._dropdownView.fieldView.on('execute', ({ source })=>{
367
+ this.currentGroupName = source.name;
368
+ });
369
+ addListToDropdown(this._dropdownView.fieldView, items, {
370
+ ariaLabel: accessibleLabel,
371
+ role: 'menu'
372
+ });
373
+ }
374
+ }
375
+
376
+ const ALL_SPECIAL_CHARACTERS_GROUP = 'All';
377
+ /**
378
+ * The special characters feature.
379
+ *
380
+ * Introduces the `'specialCharacters'` dropdown.
381
+ */ class SpecialCharacters extends Plugin {
382
+ /**
383
+ * Registered characters. A pair of a character name and its symbol.
384
+ */ _characters;
385
+ /**
386
+ * Registered groups. Each group contains a displayed label and a collection with symbol names.
387
+ */ _groups;
388
+ /**
389
+ * A label describing the "All" special characters category.
390
+ */ _allSpecialCharactersGroupLabel;
391
+ /**
392
+ * @inheritDoc
393
+ */ static get requires() {
394
+ return [
395
+ Typing,
396
+ Dialog
397
+ ];
398
+ }
399
+ /**
400
+ * @inheritDoc
401
+ */ static get pluginName() {
402
+ return 'SpecialCharacters';
403
+ }
404
+ /**
405
+ * @inheritDoc
406
+ */ static get isOfficialPlugin() {
407
+ return true;
408
+ }
409
+ /**
410
+ * @inheritDoc
411
+ */ constructor(editor){
412
+ super(editor);
413
+ const t = editor.t;
414
+ this._characters = new Map();
415
+ this._groups = new Map();
416
+ this._allSpecialCharactersGroupLabel = t('All');
417
+ }
418
+ /**
419
+ * @inheritDoc
420
+ */ init() {
421
+ const editor = this.editor;
422
+ editor.ui.componentFactory.add('specialCharacters', ()=>{
423
+ const button = this._createDialogButton(ButtonView);
424
+ button.set({
425
+ tooltip: true
426
+ });
427
+ return button;
428
+ });
429
+ editor.ui.componentFactory.add('menuBar:specialCharacters', ()=>{
430
+ return this._createDialogButton(MenuBarMenuListItemButtonView);
431
+ });
432
+ }
433
+ /**
434
+ * Adds a collection of special characters to the specified group. The title of a special character must be unique.
435
+ *
436
+ * **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
437
+ * characters category.
438
+ */ addItems(groupName, items, options = {
439
+ label: groupName
440
+ }) {
441
+ if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
442
+ /**
443
+ * The name "All" for a special category group cannot be used because it is a special category that displays all
444
+ * available special characters.
445
+ *
446
+ * @error special-character-invalid-group-name
447
+ */ throw new CKEditorError('special-character-invalid-group-name', null);
448
+ }
449
+ const group = this._getGroup(groupName, options.label);
450
+ for (const item of items){
451
+ group.items.add(item.title);
452
+ this._characters.set(item.title, item.character);
453
+ }
454
+ }
455
+ /**
456
+ * Returns special character groups in an order determined based on configuration and registration sequence.
457
+ */ getGroups() {
458
+ const groups = Array.from(this._groups.keys());
459
+ const order = this.editor.config.get('specialCharacters.order') || [];
460
+ const invalidGroup = order.find((item)=>!groups.includes(item));
461
+ if (invalidGroup) {
462
+ /**
463
+ * One of the special character groups in the "specialCharacters.order" configuration doesn't exist.
464
+ *
465
+ * @error special-character-invalid-order-group-name
466
+ */ throw new CKEditorError('special-character-invalid-order-group-name', null, {
467
+ invalidGroup
468
+ });
469
+ }
470
+ return new Set([
471
+ ...order,
472
+ ...groups
473
+ ]);
474
+ }
475
+ /**
476
+ * Returns a collection of special characters symbol names (titles).
477
+ */ getCharactersForGroup(groupName) {
478
+ if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
479
+ return new Set(this._characters.keys());
480
+ }
481
+ const group = this._groups.get(groupName);
482
+ if (group) {
483
+ return group.items;
484
+ }
485
+ }
486
+ /**
487
+ * Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
488
+ * is returned.
489
+ *
490
+ * @param title The title of a special character.
491
+ */ getCharacter(title) {
492
+ return this._characters.get(title);
493
+ }
494
+ /**
495
+ * Returns a group of special characters. If the group with the specified name does not exist, it will be created.
496
+ *
497
+ * @param groupName The name of the group to create.
498
+ * @param label The label describing the new group.
499
+ */ _getGroup(groupName, label) {
500
+ if (!this._groups.has(groupName)) {
501
+ this._groups.set(groupName, {
502
+ items: new Set(),
503
+ label
504
+ });
505
+ }
506
+ return this._groups.get(groupName);
507
+ }
508
+ /**
509
+ * Updates the symbol grid depending on the currently selected character group.
510
+ */ _updateGrid(currentGroupName, gridView) {
511
+ // Updating the grid starts with removing all tiles belonging to the old group.
512
+ gridView.tiles.clear();
513
+ const characterTitles = this.getCharactersForGroup(currentGroupName);
514
+ for (const title of characterTitles){
515
+ const character = this.getCharacter(title);
516
+ gridView.tiles.add(gridView.createTile(character, title));
517
+ }
518
+ }
519
+ /**
520
+ * Initializes the dropdown, used for lazy loading.
521
+ *
522
+ * @returns An object with `categoriesView`, `gridView` and `infoView` properties, containing UI parts.
523
+ */ _createDropdownPanelContent(locale) {
524
+ const groupEntries = Array.from(this.getGroups()).map((name)=>[
525
+ name,
526
+ this._groups.get(name).label
527
+ ]);
528
+ // The map contains a name of category (an identifier) and its label (a translational string).
529
+ const specialCharsGroups = new Map([
530
+ // Add a special group that shows all available special characters.
531
+ [
532
+ ALL_SPECIAL_CHARACTERS_GROUP,
533
+ this._allSpecialCharactersGroupLabel
534
+ ],
535
+ ...groupEntries
536
+ ]);
537
+ const categoriesView = new SpecialCharactersCategoriesView(locale, specialCharsGroups);
538
+ const gridView = new CharacterGridView(locale);
539
+ const infoView = new CharacterInfoView(locale);
540
+ gridView.on('tileHover', (evt, data)=>{
541
+ infoView.set(data);
542
+ });
543
+ gridView.on('tileFocus', (evt, data)=>{
544
+ infoView.set(data);
545
+ });
546
+ // Update the grid of special characters when a user changed the character group.
547
+ categoriesView.on('change:currentGroupName', (evt, propertyName, newValue)=>{
548
+ this._updateGrid(newValue, gridView);
549
+ });
550
+ // Set the initial content of the special characters grid.
551
+ this._updateGrid(categoriesView.currentGroupName, gridView);
552
+ return {
553
+ categoriesView,
554
+ gridView,
555
+ infoView
556
+ };
557
+ }
558
+ /**
559
+ * Creates a button for toolbar and menu bar that will show special characters dialog.
560
+ */ _createDialogButton(ButtonClass) {
561
+ const editor = this.editor;
562
+ const locale = editor.locale;
563
+ const buttonView = new ButtonClass(editor.locale);
564
+ const command = editor.commands.get('insertText');
565
+ const t = locale.t;
566
+ const dialogPlugin = this.editor.plugins.get('Dialog');
567
+ buttonView.set({
568
+ label: t('Special characters'),
569
+ icon: specialCharactersIcon,
570
+ isToggleable: true
571
+ });
572
+ buttonView.bind('isOn').to(dialogPlugin, 'id', (id)=>id === 'specialCharacters');
573
+ buttonView.bind('isEnabled').to(command, 'isEnabled');
574
+ buttonView.on('execute', ()=>{
575
+ if (dialogPlugin.id === 'specialCharacters') {
576
+ dialogPlugin.hide();
577
+ return;
578
+ }
579
+ this._showDialog();
580
+ });
581
+ return buttonView;
582
+ }
583
+ _showDialog() {
584
+ const editor = this.editor;
585
+ const dialog = editor.plugins.get('Dialog');
586
+ const locale = editor.locale;
587
+ const t = locale.t;
588
+ const { categoriesView, gridView, infoView } = this._createDropdownPanelContent(locale);
589
+ const content = new SpecialCharactersView(locale, categoriesView, gridView, infoView);
590
+ gridView.on('execute', (evt, data)=>{
591
+ editor.execute('insertText', {
592
+ text: data.character
593
+ });
594
+ });
595
+ dialog.show({
596
+ id: 'specialCharacters',
597
+ title: t('Special characters'),
598
+ className: 'ck-special-characters',
599
+ content,
600
+ position: DialogViewPosition.EDITOR_TOP_SIDE
601
+ });
602
+ }
603
+ }
604
+
605
+ /**
606
+ * A plugin that provides special characters for the "Arrows" category.
607
+ *
608
+ * ```ts
609
+ * ClassicEditor
610
+ * .create( {
611
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
612
+ * } )
613
+ * .then( ... )
614
+ * .catch( ... );
615
+ * ```
616
+ */ class SpecialCharactersArrows extends Plugin {
617
+ /**
618
+ * @inheritDoc
619
+ */ static get pluginName() {
620
+ return 'SpecialCharactersArrows';
621
+ }
622
+ /**
623
+ * @inheritDoc
624
+ */ static get isOfficialPlugin() {
625
+ return true;
626
+ }
627
+ /**
628
+ * @inheritDoc
629
+ */ init() {
630
+ const editor = this.editor;
631
+ const t = editor.t;
632
+ const plugin = editor.plugins.get('SpecialCharacters');
633
+ plugin.addItems('Arrows', [
634
+ {
635
+ title: t('leftwards simple arrow'),
636
+ character: '←'
637
+ },
638
+ {
639
+ title: t('rightwards simple arrow'),
640
+ character: '→'
641
+ },
642
+ {
643
+ title: t('upwards simple arrow'),
644
+ character: '↑'
645
+ },
646
+ {
647
+ title: t('downwards simple arrow'),
648
+ character: '↓'
649
+ },
650
+ {
651
+ title: t('leftwards double arrow'),
652
+ character: '⇐'
653
+ },
654
+ {
655
+ title: t('rightwards double arrow'),
656
+ character: '⇒'
657
+ },
658
+ {
659
+ title: t('upwards double arrow'),
660
+ character: '⇑'
661
+ },
662
+ {
663
+ title: t('downwards double arrow'),
664
+ character: '⇓'
665
+ },
666
+ {
667
+ title: t('leftwards dashed arrow'),
668
+ character: '⇠'
669
+ },
670
+ {
671
+ title: t('rightwards dashed arrow'),
672
+ character: '⇢'
673
+ },
674
+ {
675
+ title: t('upwards dashed arrow'),
676
+ character: '⇡'
677
+ },
678
+ {
679
+ title: t('downwards dashed arrow'),
680
+ character: '⇣'
681
+ },
682
+ {
683
+ title: t('leftwards arrow to bar'),
684
+ character: '⇤'
685
+ },
686
+ {
687
+ title: t('rightwards arrow to bar'),
688
+ character: '⇥'
689
+ },
690
+ {
691
+ title: t('upwards arrow to bar'),
692
+ character: '⤒'
693
+ },
694
+ {
695
+ title: t('downwards arrow to bar'),
696
+ character: '⤓'
697
+ },
698
+ {
699
+ title: t('up down arrow with base'),
700
+ character: '↨'
701
+ },
702
+ {
703
+ title: t('back with leftwards arrow above'),
704
+ character: '🔙'
705
+ },
706
+ {
707
+ title: t('end with leftwards arrow above'),
708
+ character: '🔚'
709
+ },
710
+ {
711
+ title: t('on with exclamation mark with left right arrow above'),
712
+ character: '🔛'
713
+ },
714
+ {
715
+ title: t('soon with rightwards arrow above'),
716
+ character: '🔜'
717
+ },
718
+ {
719
+ title: t('top with upwards arrow above'),
720
+ character: '🔝'
721
+ }
722
+ ], {
723
+ label: t('Arrows')
724
+ });
725
+ }
726
+ }
727
+
728
+ /**
729
+ * A plugin that provides special characters for the "Text" category.
730
+ *
731
+ * ```ts
732
+ * ClassicEditor
733
+ * .create( {
734
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersText ],
735
+ * } )
736
+ * .then( ... )
737
+ * .catch( ... );
738
+ * ```
739
+ */ class SpecialCharactersText extends Plugin {
740
+ /**
741
+ * @inheritDoc
742
+ */ static get pluginName() {
743
+ return 'SpecialCharactersText';
744
+ }
745
+ /**
746
+ * @inheritDoc
747
+ */ static get isOfficialPlugin() {
748
+ return true;
749
+ }
750
+ /**
751
+ * @inheritDoc
752
+ */ init() {
753
+ const editor = this.editor;
754
+ const t = editor.t;
755
+ const plugin = editor.plugins.get('SpecialCharacters');
756
+ plugin.addItems('Text', [
757
+ {
758
+ character: '‹',
759
+ title: t('Single left-pointing angle quotation mark')
760
+ },
761
+ {
762
+ character: '›',
763
+ title: t('Single right-pointing angle quotation mark')
764
+ },
765
+ {
766
+ character: '«',
767
+ title: t('Left-pointing double angle quotation mark')
768
+ },
769
+ {
770
+ character: '»',
771
+ title: t('Right-pointing double angle quotation mark')
772
+ },
773
+ {
774
+ character: '‘',
775
+ title: t('Left single quotation mark')
776
+ },
777
+ {
778
+ character: '’',
779
+ title: t('Right single quotation mark')
780
+ },
781
+ {
782
+ character: '“',
783
+ title: t('Left double quotation mark')
784
+ },
785
+ {
786
+ character: '”',
787
+ title: t('Right double quotation mark')
788
+ },
789
+ {
790
+ character: '‚',
791
+ title: t('Single low-9 quotation mark')
792
+ },
793
+ {
794
+ character: '„',
795
+ title: t('Double low-9 quotation mark')
796
+ },
797
+ {
798
+ character: '¡',
799
+ title: t('Inverted exclamation mark')
800
+ },
801
+ {
802
+ character: '¿',
803
+ title: t('Inverted question mark')
804
+ },
805
+ {
806
+ character: '‥',
807
+ title: t('Two dot leader')
808
+ },
809
+ {
810
+ character: '…',
811
+ title: t('Horizontal ellipsis')
812
+ },
813
+ {
814
+ character: '‡',
815
+ title: t('Double dagger')
816
+ },
817
+ {
818
+ character: '‰',
819
+ title: t('Per mille sign')
820
+ },
821
+ {
822
+ character: '‱',
823
+ title: t('Per ten thousand sign')
824
+ },
825
+ {
826
+ character: '‼',
827
+ title: t('Double exclamation mark')
828
+ },
829
+ {
830
+ character: '⁈',
831
+ title: t('Question exclamation mark')
832
+ },
833
+ {
834
+ character: '⁉',
835
+ title: t('Exclamation question mark')
836
+ },
837
+ {
838
+ character: '⁇',
839
+ title: t('Double question mark')
840
+ },
841
+ {
842
+ character: '©',
843
+ title: t('Copyright sign')
844
+ },
845
+ {
846
+ character: '®',
847
+ title: t('Registered sign')
848
+ },
849
+ {
850
+ character: '™',
851
+ title: t('Trade mark sign')
852
+ },
853
+ {
854
+ character: '§',
855
+ title: t('Section sign')
856
+ },
857
+ {
858
+ character: '¶',
859
+ title: t('Paragraph sign')
860
+ },
861
+ {
862
+ character: '⁋',
863
+ title: t('Reversed paragraph sign')
864
+ }
865
+ ], {
866
+ label: t('Text')
867
+ });
868
+ }
869
+ }
870
+
871
+ /**
872
+ * A plugin that provides special characters for the "Mathematical" category.
873
+ *
874
+ * ```ts
875
+ * ClassicEditor
876
+ * .create( {
877
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersMathematical ],
878
+ * } )
879
+ * .then( ... )
880
+ * .catch( ... );
881
+ * ```
882
+ */ class SpecialCharactersMathematical extends Plugin {
883
+ /**
884
+ * @inheritDoc
885
+ */ static get pluginName() {
886
+ return 'SpecialCharactersMathematical';
887
+ }
888
+ /**
889
+ * @inheritDoc
890
+ */ static get isOfficialPlugin() {
891
+ return true;
892
+ }
893
+ /**
894
+ * @inheritDoc
895
+ */ init() {
896
+ const editor = this.editor;
897
+ const t = editor.t;
898
+ const plugin = editor.plugins.get('SpecialCharacters');
899
+ plugin.addItems('Mathematical', [
900
+ {
901
+ character: '<',
902
+ title: t('Less-than sign')
903
+ },
904
+ {
905
+ character: '>',
906
+ title: t('Greater-than sign')
907
+ },
908
+ {
909
+ character: '≤',
910
+ title: t('Less-than or equal to')
911
+ },
912
+ {
913
+ character: '≥',
914
+ title: t('Greater-than or equal to')
915
+ },
916
+ {
917
+ character: '–',
918
+ title: t('En dash')
919
+ },
920
+ {
921
+ character: '—',
922
+ title: t('Em dash')
923
+ },
924
+ {
925
+ character: '¯',
926
+ title: t('Macron')
927
+ },
928
+ {
929
+ character: '‾',
930
+ title: t('Overline')
931
+ },
932
+ {
933
+ character: '°',
934
+ title: t('Degree sign')
935
+ },
936
+ {
937
+ character: '−',
938
+ title: t('Minus sign')
939
+ },
940
+ {
941
+ character: '±',
942
+ title: t('Plus-minus sign')
943
+ },
944
+ {
945
+ character: '÷',
946
+ title: t('Division sign')
947
+ },
948
+ {
949
+ character: '⁄',
950
+ title: t('Fraction slash')
951
+ },
952
+ {
953
+ character: '×',
954
+ title: t('Multiplication sign')
955
+ },
956
+ {
957
+ character: 'ƒ',
958
+ title: t('Latin small letter f with hook')
959
+ },
960
+ {
961
+ character: '∫',
962
+ title: t('Integral')
963
+ },
964
+ {
965
+ character: '∑',
966
+ title: t('N-ary summation')
967
+ },
968
+ {
969
+ character: '∞',
970
+ title: t('Infinity')
971
+ },
972
+ {
973
+ character: '√',
974
+ title: t('Square root')
975
+ },
976
+ {
977
+ character: '∼',
978
+ title: t('Tilde operator')
979
+ },
980
+ {
981
+ character: '≅',
982
+ title: t('Approximately equal to')
983
+ },
984
+ {
985
+ character: '≈',
986
+ title: t('Almost equal to')
987
+ },
988
+ {
989
+ character: '≠',
990
+ title: t('Not equal to')
991
+ },
992
+ {
993
+ character: '≡',
994
+ title: t('Identical to')
995
+ },
996
+ {
997
+ character: '∈',
998
+ title: t('Element of')
999
+ },
1000
+ {
1001
+ character: '∉',
1002
+ title: t('Not an element of')
1003
+ },
1004
+ {
1005
+ character: '∋',
1006
+ title: t('Contains as member')
1007
+ },
1008
+ {
1009
+ character: '∏',
1010
+ title: t('N-ary product')
1011
+ },
1012
+ {
1013
+ character: '∧',
1014
+ title: t('Logical and')
1015
+ },
1016
+ {
1017
+ character: '∨',
1018
+ title: t('Logical or')
1019
+ },
1020
+ {
1021
+ character: '¬',
1022
+ title: t('Not sign')
1023
+ },
1024
+ {
1025
+ character: '∩',
1026
+ title: t('Intersection')
1027
+ },
1028
+ {
1029
+ character: '∪',
1030
+ title: t('Union')
1031
+ },
1032
+ {
1033
+ character: '∂',
1034
+ title: t('Partial differential')
1035
+ },
1036
+ {
1037
+ character: '∀',
1038
+ title: t('For all')
1039
+ },
1040
+ {
1041
+ character: '∃',
1042
+ title: t('There exists')
1043
+ },
1044
+ {
1045
+ character: '∅',
1046
+ title: t('Empty set')
1047
+ },
1048
+ {
1049
+ character: '∇',
1050
+ title: t('Nabla')
1051
+ },
1052
+ {
1053
+ character: '∗',
1054
+ title: t('Asterisk operator')
1055
+ },
1056
+ {
1057
+ character: '∝',
1058
+ title: t('Proportional to')
1059
+ },
1060
+ {
1061
+ character: '∠',
1062
+ title: t('Angle')
1063
+ },
1064
+ {
1065
+ character: '¼',
1066
+ title: t('Vulgar fraction one quarter')
1067
+ },
1068
+ {
1069
+ character: '½',
1070
+ title: t('Vulgar fraction one half')
1071
+ },
1072
+ {
1073
+ character: '¾',
1074
+ title: t('Vulgar fraction three quarters')
1075
+ }
1076
+ ], {
1077
+ label: t('Mathematical')
1078
+ });
1079
+ }
1080
+ }
1081
+
1082
+ /**
1083
+ * A plugin that provides special characters for the "Latin" category.
1084
+ *
1085
+ * ```ts
1086
+ * ClassicEditor
1087
+ * .create( {
1088
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
1089
+ * } )
1090
+ * .then( ... )
1091
+ * .catch( ... );
1092
+ * ```
1093
+ */ class SpecialCharactersLatin extends Plugin {
1094
+ /**
1095
+ * @inheritDoc
1096
+ */ static get pluginName() {
1097
+ return 'SpecialCharactersLatin';
1098
+ }
1099
+ /**
1100
+ * @inheritDoc
1101
+ */ static get isOfficialPlugin() {
1102
+ return true;
1103
+ }
1104
+ /**
1105
+ * @inheritDoc
1106
+ */ init() {
1107
+ const editor = this.editor;
1108
+ const t = editor.t;
1109
+ const plugin = editor.plugins.get('SpecialCharacters');
1110
+ plugin.addItems('Latin', [
1111
+ {
1112
+ character: 'Ā',
1113
+ title: t('Latin capital letter a with macron')
1114
+ },
1115
+ {
1116
+ character: 'ā',
1117
+ title: t('Latin small letter a with macron')
1118
+ },
1119
+ {
1120
+ character: 'Ă',
1121
+ title: t('Latin capital letter a with breve')
1122
+ },
1123
+ {
1124
+ character: 'ă',
1125
+ title: t('Latin small letter a with breve')
1126
+ },
1127
+ {
1128
+ character: 'Ą',
1129
+ title: t('Latin capital letter a with ogonek')
1130
+ },
1131
+ {
1132
+ character: 'ą',
1133
+ title: t('Latin small letter a with ogonek')
1134
+ },
1135
+ {
1136
+ character: 'Ć',
1137
+ title: t('Latin capital letter c with acute')
1138
+ },
1139
+ {
1140
+ character: 'ć',
1141
+ title: t('Latin small letter c with acute')
1142
+ },
1143
+ {
1144
+ character: 'Ĉ',
1145
+ title: t('Latin capital letter c with circumflex')
1146
+ },
1147
+ {
1148
+ character: 'ĉ',
1149
+ title: t('Latin small letter c with circumflex')
1150
+ },
1151
+ {
1152
+ character: 'Ċ',
1153
+ title: t('Latin capital letter c with dot above')
1154
+ },
1155
+ {
1156
+ character: 'ċ',
1157
+ title: t('Latin small letter c with dot above')
1158
+ },
1159
+ {
1160
+ character: 'Č',
1161
+ title: t('Latin capital letter c with caron')
1162
+ },
1163
+ {
1164
+ character: 'č',
1165
+ title: t('Latin small letter c with caron')
1166
+ },
1167
+ {
1168
+ character: 'Ď',
1169
+ title: t('Latin capital letter d with caron')
1170
+ },
1171
+ {
1172
+ character: 'ď',
1173
+ title: t('Latin small letter d with caron')
1174
+ },
1175
+ {
1176
+ character: 'Đ',
1177
+ title: t('Latin capital letter d with stroke')
1178
+ },
1179
+ {
1180
+ character: 'đ',
1181
+ title: t('Latin small letter d with stroke')
1182
+ },
1183
+ {
1184
+ character: 'Ē',
1185
+ title: t('Latin capital letter e with macron')
1186
+ },
1187
+ {
1188
+ character: 'ē',
1189
+ title: t('Latin small letter e with macron')
1190
+ },
1191
+ {
1192
+ character: 'Ĕ',
1193
+ title: t('Latin capital letter e with breve')
1194
+ },
1195
+ {
1196
+ character: 'ĕ',
1197
+ title: t('Latin small letter e with breve')
1198
+ },
1199
+ {
1200
+ character: 'Ė',
1201
+ title: t('Latin capital letter e with dot above')
1202
+ },
1203
+ {
1204
+ character: 'ė',
1205
+ title: t('Latin small letter e with dot above')
1206
+ },
1207
+ {
1208
+ character: 'Ę',
1209
+ title: t('Latin capital letter e with ogonek')
1210
+ },
1211
+ {
1212
+ character: 'ę',
1213
+ title: t('Latin small letter e with ogonek')
1214
+ },
1215
+ {
1216
+ character: 'Ě',
1217
+ title: t('Latin capital letter e with caron')
1218
+ },
1219
+ {
1220
+ character: 'ě',
1221
+ title: t('Latin small letter e with caron')
1222
+ },
1223
+ {
1224
+ character: 'Ĝ',
1225
+ title: t('Latin capital letter g with circumflex')
1226
+ },
1227
+ {
1228
+ character: 'ĝ',
1229
+ title: t('Latin small letter g with circumflex')
1230
+ },
1231
+ {
1232
+ character: 'Ğ',
1233
+ title: t('Latin capital letter g with breve')
1234
+ },
1235
+ {
1236
+ character: 'ğ',
1237
+ title: t('Latin small letter g with breve')
1238
+ },
1239
+ {
1240
+ character: 'Ġ',
1241
+ title: t('Latin capital letter g with dot above')
1242
+ },
1243
+ {
1244
+ character: 'ġ',
1245
+ title: t('Latin small letter g with dot above')
1246
+ },
1247
+ {
1248
+ character: 'Ģ',
1249
+ title: t('Latin capital letter g with cedilla')
1250
+ },
1251
+ {
1252
+ character: 'ģ',
1253
+ title: t('Latin small letter g with cedilla')
1254
+ },
1255
+ {
1256
+ character: 'Ĥ',
1257
+ title: t('Latin capital letter h with circumflex')
1258
+ },
1259
+ {
1260
+ character: 'ĥ',
1261
+ title: t('Latin small letter h with circumflex')
1262
+ },
1263
+ {
1264
+ character: 'Ħ',
1265
+ title: t('Latin capital letter h with stroke')
1266
+ },
1267
+ {
1268
+ character: 'ħ',
1269
+ title: t('Latin small letter h with stroke')
1270
+ },
1271
+ {
1272
+ character: 'Ĩ',
1273
+ title: t('Latin capital letter i with tilde')
1274
+ },
1275
+ {
1276
+ character: 'ĩ',
1277
+ title: t('Latin small letter i with tilde')
1278
+ },
1279
+ {
1280
+ character: 'Ī',
1281
+ title: t('Latin capital letter i with macron')
1282
+ },
1283
+ {
1284
+ character: 'ī',
1285
+ title: t('Latin small letter i with macron')
1286
+ },
1287
+ {
1288
+ character: 'Ĭ',
1289
+ title: t('Latin capital letter i with breve')
1290
+ },
1291
+ {
1292
+ character: 'ĭ',
1293
+ title: t('Latin small letter i with breve')
1294
+ },
1295
+ {
1296
+ character: 'Į',
1297
+ title: t('Latin capital letter i with ogonek')
1298
+ },
1299
+ {
1300
+ character: 'į',
1301
+ title: t('Latin small letter i with ogonek')
1302
+ },
1303
+ {
1304
+ character: 'İ',
1305
+ title: t('Latin capital letter i with dot above')
1306
+ },
1307
+ {
1308
+ character: 'ı',
1309
+ title: t('Latin small letter dotless i')
1310
+ },
1311
+ {
1312
+ character: 'IJ',
1313
+ title: t('Latin capital ligature ij')
1314
+ },
1315
+ {
1316
+ character: 'ij',
1317
+ title: t('Latin small ligature ij')
1318
+ },
1319
+ {
1320
+ character: 'Ĵ',
1321
+ title: t('Latin capital letter j with circumflex')
1322
+ },
1323
+ {
1324
+ character: 'ĵ',
1325
+ title: t('Latin small letter j with circumflex')
1326
+ },
1327
+ {
1328
+ character: 'Ķ',
1329
+ title: t('Latin capital letter k with cedilla')
1330
+ },
1331
+ {
1332
+ character: 'ķ',
1333
+ title: t('Latin small letter k with cedilla')
1334
+ },
1335
+ {
1336
+ character: 'ĸ',
1337
+ title: t('Latin small letter kra')
1338
+ },
1339
+ {
1340
+ character: 'Ĺ',
1341
+ title: t('Latin capital letter l with acute')
1342
+ },
1343
+ {
1344
+ character: 'ĺ',
1345
+ title: t('Latin small letter l with acute')
1346
+ },
1347
+ {
1348
+ character: 'Ļ',
1349
+ title: t('Latin capital letter l with cedilla')
1350
+ },
1351
+ {
1352
+ character: 'ļ',
1353
+ title: t('Latin small letter l with cedilla')
1354
+ },
1355
+ {
1356
+ character: 'Ľ',
1357
+ title: t('Latin capital letter l with caron')
1358
+ },
1359
+ {
1360
+ character: 'ľ',
1361
+ title: t('Latin small letter l with caron')
1362
+ },
1363
+ {
1364
+ character: 'Ŀ',
1365
+ title: t('Latin capital letter l with middle dot')
1366
+ },
1367
+ {
1368
+ character: 'ŀ',
1369
+ title: t('Latin small letter l with middle dot')
1370
+ },
1371
+ {
1372
+ character: 'Ł',
1373
+ title: t('Latin capital letter l with stroke')
1374
+ },
1375
+ {
1376
+ character: 'ł',
1377
+ title: t('Latin small letter l with stroke')
1378
+ },
1379
+ {
1380
+ character: 'Ń',
1381
+ title: t('Latin capital letter n with acute')
1382
+ },
1383
+ {
1384
+ character: 'ń',
1385
+ title: t('Latin small letter n with acute')
1386
+ },
1387
+ {
1388
+ character: 'Ņ',
1389
+ title: t('Latin capital letter n with cedilla')
1390
+ },
1391
+ {
1392
+ character: 'ņ',
1393
+ title: t('Latin small letter n with cedilla')
1394
+ },
1395
+ {
1396
+ character: 'Ň',
1397
+ title: t('Latin capital letter n with caron')
1398
+ },
1399
+ {
1400
+ character: 'ň',
1401
+ title: t('Latin small letter n with caron')
1402
+ },
1403
+ {
1404
+ character: 'ʼn',
1405
+ title: t('Latin small letter n preceded by apostrophe')
1406
+ },
1407
+ {
1408
+ character: 'Ŋ',
1409
+ title: t('Latin capital letter eng')
1410
+ },
1411
+ {
1412
+ character: 'ŋ',
1413
+ title: t('Latin small letter eng')
1414
+ },
1415
+ {
1416
+ character: 'Ō',
1417
+ title: t('Latin capital letter o with macron')
1418
+ },
1419
+ {
1420
+ character: 'ō',
1421
+ title: t('Latin small letter o with macron')
1422
+ },
1423
+ {
1424
+ character: 'Ŏ',
1425
+ title: t('Latin capital letter o with breve')
1426
+ },
1427
+ {
1428
+ character: 'ŏ',
1429
+ title: t('Latin small letter o with breve')
1430
+ },
1431
+ {
1432
+ character: 'Ő',
1433
+ title: t('Latin capital letter o with double acute')
1434
+ },
1435
+ {
1436
+ character: 'ő',
1437
+ title: t('Latin small letter o with double acute')
1438
+ },
1439
+ {
1440
+ character: 'Œ',
1441
+ title: t('Latin capital ligature oe')
1442
+ },
1443
+ {
1444
+ character: 'œ',
1445
+ title: t('Latin small ligature oe')
1446
+ },
1447
+ {
1448
+ character: 'Ŕ',
1449
+ title: t('Latin capital letter r with acute')
1450
+ },
1451
+ {
1452
+ character: 'ŕ',
1453
+ title: t('Latin small letter r with acute')
1454
+ },
1455
+ {
1456
+ character: 'Ŗ',
1457
+ title: t('Latin capital letter r with cedilla')
1458
+ },
1459
+ {
1460
+ character: 'ŗ',
1461
+ title: t('Latin small letter r with cedilla')
1462
+ },
1463
+ {
1464
+ character: 'Ř',
1465
+ title: t('Latin capital letter r with caron')
1466
+ },
1467
+ {
1468
+ character: 'ř',
1469
+ title: t('Latin small letter r with caron')
1470
+ },
1471
+ {
1472
+ character: 'Ś',
1473
+ title: t('Latin capital letter s with acute')
1474
+ },
1475
+ {
1476
+ character: 'ś',
1477
+ title: t('Latin small letter s with acute')
1478
+ },
1479
+ {
1480
+ character: 'Ŝ',
1481
+ title: t('Latin capital letter s with circumflex')
1482
+ },
1483
+ {
1484
+ character: 'ŝ',
1485
+ title: t('Latin small letter s with circumflex')
1486
+ },
1487
+ {
1488
+ character: 'Ş',
1489
+ title: t('Latin capital letter s with cedilla')
1490
+ },
1491
+ {
1492
+ character: 'ş',
1493
+ title: t('Latin small letter s with cedilla')
1494
+ },
1495
+ {
1496
+ character: 'Š',
1497
+ title: t('Latin capital letter s with caron')
1498
+ },
1499
+ {
1500
+ character: 'š',
1501
+ title: t('Latin small letter s with caron')
1502
+ },
1503
+ {
1504
+ character: 'Ţ',
1505
+ title: t('Latin capital letter t with cedilla')
1506
+ },
1507
+ {
1508
+ character: 'ţ',
1509
+ title: t('Latin small letter t with cedilla')
1510
+ },
1511
+ {
1512
+ character: 'Ť',
1513
+ title: t('Latin capital letter t with caron')
1514
+ },
1515
+ {
1516
+ character: 'ť',
1517
+ title: t('Latin small letter t with caron')
1518
+ },
1519
+ {
1520
+ character: 'Ŧ',
1521
+ title: t('Latin capital letter t with stroke')
1522
+ },
1523
+ {
1524
+ character: 'ŧ',
1525
+ title: t('Latin small letter t with stroke')
1526
+ },
1527
+ {
1528
+ character: 'Ũ',
1529
+ title: t('Latin capital letter u with tilde')
1530
+ },
1531
+ {
1532
+ character: 'ũ',
1533
+ title: t('Latin small letter u with tilde')
1534
+ },
1535
+ {
1536
+ character: 'Ū',
1537
+ title: t('Latin capital letter u with macron')
1538
+ },
1539
+ {
1540
+ character: 'ū',
1541
+ title: t('Latin small letter u with macron')
1542
+ },
1543
+ {
1544
+ character: 'Ŭ',
1545
+ title: t('Latin capital letter u with breve')
1546
+ },
1547
+ {
1548
+ character: 'ŭ',
1549
+ title: t('Latin small letter u with breve')
1550
+ },
1551
+ {
1552
+ character: 'Ů',
1553
+ title: t('Latin capital letter u with ring above')
1554
+ },
1555
+ {
1556
+ character: 'ů',
1557
+ title: t('Latin small letter u with ring above')
1558
+ },
1559
+ {
1560
+ character: 'Ű',
1561
+ title: t('Latin capital letter u with double acute')
1562
+ },
1563
+ {
1564
+ character: 'ű',
1565
+ title: t('Latin small letter u with double acute')
1566
+ },
1567
+ {
1568
+ character: 'Ų',
1569
+ title: t('Latin capital letter u with ogonek')
1570
+ },
1571
+ {
1572
+ character: 'ų',
1573
+ title: t('Latin small letter u with ogonek')
1574
+ },
1575
+ {
1576
+ character: 'Ŵ',
1577
+ title: t('Latin capital letter w with circumflex')
1578
+ },
1579
+ {
1580
+ character: 'ŵ',
1581
+ title: t('Latin small letter w with circumflex')
1582
+ },
1583
+ {
1584
+ character: 'Ŷ',
1585
+ title: t('Latin capital letter y with circumflex')
1586
+ },
1587
+ {
1588
+ character: 'ŷ',
1589
+ title: t('Latin small letter y with circumflex')
1590
+ },
1591
+ {
1592
+ character: 'Ÿ',
1593
+ title: t('Latin capital letter y with diaeresis')
1594
+ },
1595
+ {
1596
+ character: 'Ź',
1597
+ title: t('Latin capital letter z with acute')
1598
+ },
1599
+ {
1600
+ character: 'ź',
1601
+ title: t('Latin small letter z with acute')
1602
+ },
1603
+ {
1604
+ character: 'Ż',
1605
+ title: t('Latin capital letter z with dot above')
1606
+ },
1607
+ {
1608
+ character: 'ż',
1609
+ title: t('Latin small letter z with dot above')
1610
+ },
1611
+ {
1612
+ character: 'Ž',
1613
+ title: t('Latin capital letter z with caron')
1614
+ },
1615
+ {
1616
+ character: 'ž',
1617
+ title: t('Latin small letter z with caron')
1618
+ },
1619
+ {
1620
+ character: 'ſ',
1621
+ title: t('Latin small letter long s')
1622
+ }
1623
+ ], {
1624
+ label: t('Latin')
1625
+ });
1626
+ }
1627
+ }
1628
+
1629
+ /**
1630
+ * A plugin that provides special characters for the "Currency" category.
1631
+ *
1632
+ * ```ts
1633
+ * ClassicEditor
1634
+ * .create( {
1635
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
1636
+ * } )
1637
+ * .then( ... )
1638
+ * .catch( ... );
1639
+ * ```
1640
+ */ class SpecialCharactersCurrency extends Plugin {
1641
+ /**
1642
+ * @inheritDoc
1643
+ */ static get pluginName() {
1644
+ return 'SpecialCharactersCurrency';
1645
+ }
1646
+ /**
1647
+ * @inheritDoc
1648
+ */ static get isOfficialPlugin() {
1649
+ return true;
1650
+ }
1651
+ /**
1652
+ * @inheritDoc
1653
+ */ init() {
1654
+ const editor = this.editor;
1655
+ const t = editor.t;
1656
+ const plugin = editor.plugins.get('SpecialCharacters');
1657
+ plugin.addItems('Currency', [
1658
+ {
1659
+ character: '$',
1660
+ title: t('Dollar sign')
1661
+ },
1662
+ {
1663
+ character: '€',
1664
+ title: t('Euro sign')
1665
+ },
1666
+ {
1667
+ character: '¥',
1668
+ title: t('Yen sign')
1669
+ },
1670
+ {
1671
+ character: '£',
1672
+ title: t('Pound sign')
1673
+ },
1674
+ {
1675
+ character: '¢',
1676
+ title: t('Cent sign')
1677
+ },
1678
+ {
1679
+ character: '₠',
1680
+ title: t('Euro-currency sign')
1681
+ },
1682
+ {
1683
+ character: '₡',
1684
+ title: t('Colon sign')
1685
+ },
1686
+ {
1687
+ character: '₢',
1688
+ title: t('Cruzeiro sign')
1689
+ },
1690
+ {
1691
+ character: '₣',
1692
+ title: t('French franc sign')
1693
+ },
1694
+ {
1695
+ character: '₤',
1696
+ title: t('Lira sign')
1697
+ },
1698
+ {
1699
+ character: '¤',
1700
+ title: t('Currency sign')
1701
+ },
1702
+ {
1703
+ character: '₿',
1704
+ title: t('Bitcoin sign')
1705
+ },
1706
+ {
1707
+ character: '₥',
1708
+ title: t('Mill sign')
1709
+ },
1710
+ {
1711
+ character: '₦',
1712
+ title: t('Naira sign')
1713
+ },
1714
+ {
1715
+ character: '₧',
1716
+ title: t('Peseta sign')
1717
+ },
1718
+ {
1719
+ character: '₨',
1720
+ title: t('Rupee sign')
1721
+ },
1722
+ {
1723
+ character: '₩',
1724
+ title: t('Won sign')
1725
+ },
1726
+ {
1727
+ character: '₪',
1728
+ title: t('New sheqel sign')
1729
+ },
1730
+ {
1731
+ character: '₫',
1732
+ title: t('Dong sign')
1733
+ },
1734
+ {
1735
+ character: '₭',
1736
+ title: t('Kip sign')
1737
+ },
1738
+ {
1739
+ character: '₮',
1740
+ title: t('Tugrik sign')
1741
+ },
1742
+ {
1743
+ character: '₯',
1744
+ title: t('Drachma sign')
1745
+ },
1746
+ {
1747
+ character: '₰',
1748
+ title: t('German penny sign')
1749
+ },
1750
+ {
1751
+ character: '₱',
1752
+ title: t('Peso sign')
1753
+ },
1754
+ {
1755
+ character: '₲',
1756
+ title: t('Guarani sign')
1757
+ },
1758
+ {
1759
+ character: '₳',
1760
+ title: t('Austral sign')
1761
+ },
1762
+ {
1763
+ character: '₴',
1764
+ title: t('Hryvnia sign')
1765
+ },
1766
+ {
1767
+ character: '₵',
1768
+ title: t('Cedi sign')
1769
+ },
1770
+ {
1771
+ character: '₶',
1772
+ title: t('Livre tournois sign')
1773
+ },
1774
+ {
1775
+ character: '₷',
1776
+ title: t('Spesmilo sign')
1777
+ },
1778
+ {
1779
+ character: '₸',
1780
+ title: t('Tenge sign')
1781
+ },
1782
+ {
1783
+ character: '₹',
1784
+ title: t('Indian rupee sign')
1785
+ },
1786
+ {
1787
+ character: '₺',
1788
+ title: t('Turkish lira sign')
1789
+ },
1790
+ {
1791
+ character: '₻',
1792
+ title: t('Nordic mark sign')
1793
+ },
1794
+ {
1795
+ character: '₼',
1796
+ title: t('Manat sign')
1797
+ },
1798
+ {
1799
+ character: '₽',
1800
+ title: t('Ruble sign')
1801
+ }
1802
+ ], {
1803
+ label: t('Currency')
1804
+ });
1805
+ }
1806
+ }
1807
+
1808
+ /**
1809
+ * A plugin combining a basic set of characters for the special characters plugin.
1810
+ *
1811
+ * ```ts
1812
+ * ClassicEditor
1813
+ * .create( {
1814
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
1815
+ * } )
1816
+ * .then( ... )
1817
+ * .catch( ... );
1818
+ * ```
1819
+ */ class SpecialCharactersEssentials extends Plugin {
1820
+ /**
1821
+ * @inheritDoc
1822
+ */ static get pluginName() {
1823
+ return 'SpecialCharactersEssentials';
1824
+ }
1825
+ /**
1826
+ * @inheritDoc
1827
+ */ static get isOfficialPlugin() {
1828
+ return true;
1829
+ }
1830
+ /**
1831
+ * @inheritDoc
1832
+ */ static get requires() {
1833
+ return [
1834
+ SpecialCharactersCurrency,
1835
+ SpecialCharactersText,
1836
+ SpecialCharactersMathematical,
1837
+ SpecialCharactersArrows,
1838
+ SpecialCharactersLatin
1839
+ ];
1840
+ }
1841
+ }
1842
+
1843
+ export { SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText };
1844
+ //# sourceMappingURL=index.js.map