specialcharacterslatin.js 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /**
  6. * @module special-characters/specialcharacterslatin
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. /**
  10. * A plugin that provides special characters for the "Latin" category.
  11. *
  12. * ClassicEditor
  13. * .create( {
  14. * plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
  15. * } )
  16. * .then( ... )
  17. * .catch( ... );
  18. *
  19. * @extends module:core/plugin~Plugin
  20. */
  21. export default class SpecialCharactersLatin extends Plugin {
  22. /**
  23. * @inheritDoc
  24. */
  25. init() {
  26. const editor = this.editor;
  27. const t = editor.t;
  28. editor.plugins.get( 'SpecialCharacters' ).addItems( 'Latin', [
  29. { character: 'Ā', title: t( 'Latin capital letter a with macron' ) },
  30. { character: 'ā', title: t( 'Latin small letter a with macron' ) },
  31. { character: 'Ă', title: t( 'Latin capital letter a with breve' ) },
  32. { character: 'ă', title: t( 'Latin small letter a with breve' ) },
  33. { character: 'Ą', title: t( 'Latin capital letter a with ogonek' ) },
  34. { character: 'ą', title: t( 'Latin small letter a with ogonek' ) },
  35. { character: 'Ć', title: t( 'Latin capital letter c with acute' ) },
  36. { character: 'ć', title: t( 'Latin small letter c with acute' ) },
  37. { character: 'Ĉ', title: t( 'Latin capital letter c with circumflex' ) },
  38. { character: 'ĉ', title: t( 'Latin small letter c with circumflex' ) },
  39. { character: 'Ċ', title: t( 'Latin capital letter c with dot above' ) },
  40. { character: 'ċ', title: t( 'Latin small letter c with dot above' ) },
  41. { character: 'Č', title: t( 'Latin capital letter c with caron' ) },
  42. { character: 'č', title: t( 'Latin small letter c with caron' ) },
  43. { character: 'Ď', title: t( 'Latin capital letter d with caron' ) },
  44. { character: 'ď', title: t( 'Latin small letter d with caron' ) },
  45. { character: 'Đ', title: t( 'Latin capital letter d with stroke' ) },
  46. { character: 'đ', title: t( 'Latin small letter d with stroke' ) },
  47. { character: 'Ē', title: t( 'Latin capital letter e with macron' ) },
  48. { character: 'ē', title: t( 'Latin small letter e with macron' ) },
  49. { character: 'Ĕ', title: t( 'Latin capital letter e with breve' ) },
  50. { character: 'ĕ', title: t( 'Latin small letter e with breve' ) },
  51. { character: 'Ė', title: t( 'Latin capital letter e with dot above' ) },
  52. { character: 'ė', title: t( 'Latin small letter e with dot above' ) },
  53. { character: 'Ę', title: t( 'Latin capital letter e with ogonek' ) },
  54. { character: 'ę', title: t( 'Latin small letter e with ogonek' ) },
  55. { character: 'Ě', title: t( 'Latin capital letter e with caron' ) },
  56. { character: 'ě', title: t( 'Latin small letter e with caron' ) },
  57. { character: 'Ĝ', title: t( 'Latin capital letter g with circumflex' ) },
  58. { character: 'ĝ', title: t( 'Latin small letter g with circumflex' ) },
  59. { character: 'Ğ', title: t( 'Latin capital letter g with breve' ) },
  60. { character: 'ğ', title: t( 'Latin small letter g with breve' ) },
  61. { character: 'Ġ', title: t( 'Latin capital letter g with dot above' ) },
  62. { character: 'ġ', title: t( 'Latin small letter g with dot above' ) },
  63. { character: 'Ģ', title: t( 'Latin capital letter g with cedilla' ) },
  64. { character: 'ģ', title: t( 'Latin small letter g with cedilla' ) },
  65. { character: 'Ĥ', title: t( 'Latin capital letter h with circumflex' ) },
  66. { character: 'ĥ', title: t( 'Latin small letter h with circumflex' ) },
  67. { character: 'Ħ', title: t( 'Latin capital letter h with stroke' ) },
  68. { character: 'ħ', title: t( 'Latin small letter h with stroke' ) },
  69. { character: 'Ĩ', title: t( 'Latin capital letter i with tilde' ) },
  70. { character: 'ĩ', title: t( 'Latin small letter i with tilde' ) },
  71. { character: 'Ī', title: t( 'Latin capital letter i with macron' ) },
  72. { character: 'ī', title: t( 'Latin small letter i with macron' ) },
  73. { character: 'Ĭ', title: t( 'Latin capital letter i with breve' ) },
  74. { character: 'ĭ', title: t( 'Latin small letter i with breve' ) },
  75. { character: 'Į', title: t( 'Latin capital letter i with ogonek' ) },
  76. { character: 'į', title: t( 'Latin small letter i with ogonek' ) },
  77. { character: 'İ', title: t( 'Latin capital letter i with dot above' ) },
  78. { character: 'ı', title: t( 'Latin small letter dotless i' ) },
  79. { character: 'IJ', title: t( 'Latin capital ligature ij' ) },
  80. { character: 'ij', title: t( 'Latin small ligature ij' ) },
  81. { character: 'Ĵ', title: t( 'Latin capital letter j with circumflex' ) },
  82. { character: 'ĵ', title: t( 'Latin small letter j with circumflex' ) },
  83. { character: 'Ķ', title: t( 'Latin capital letter k with cedilla' ) },
  84. { character: 'ķ', title: t( 'Latin small letter k with cedilla' ) },
  85. { character: 'ĸ', title: t( 'Latin small letter kra' ) },
  86. { character: 'Ĺ', title: t( 'Latin capital letter l with acute' ) },
  87. { character: 'ĺ', title: t( 'Latin small letter l with acute' ) },
  88. { character: 'Ļ', title: t( 'Latin capital letter l with cedilla' ) },
  89. { character: 'ļ', title: t( 'Latin small letter l with cedilla' ) },
  90. { character: 'Ľ', title: t( 'Latin capital letter l with caron' ) },
  91. { character: 'ľ', title: t( 'Latin small letter l with caron' ) },
  92. { character: 'Ŀ', title: t( 'Latin capital letter l with middle dot' ) },
  93. { character: 'ŀ', title: t( 'Latin small letter l with middle dot' ) },
  94. { character: 'Ł', title: t( 'Latin capital letter l with stroke' ) },
  95. { character: 'ł', title: t( 'Latin small letter l with stroke' ) },
  96. { character: 'Ń', title: t( 'Latin capital letter n with acute' ) },
  97. { character: 'ń', title: t( 'Latin small letter n with acute' ) },
  98. { character: 'Ņ', title: t( 'Latin capital letter n with cedilla' ) },
  99. { character: 'ņ', title: t( 'Latin small letter n with cedilla' ) },
  100. { character: 'Ň', title: t( 'Latin capital letter n with caron' ) },
  101. { character: 'ň', title: t( 'Latin small letter n with caron' ) },
  102. { character: 'ʼn', title: t( 'Latin small letter n preceded by apostrophe' ) },
  103. { character: 'Ŋ', title: t( 'Latin capital letter eng' ) },
  104. { character: 'ŋ', title: t( 'Latin small letter eng' ) },
  105. { character: 'Ō', title: t( 'Latin capital letter o with macron' ) },
  106. { character: 'ō', title: t( 'Latin small letter o with macron' ) },
  107. { character: 'Ŏ', title: t( 'Latin capital letter o with breve' ) },
  108. { character: 'ŏ', title: t( 'Latin small letter o with breve' ) },
  109. { character: 'Ő', title: t( 'Latin capital letter o with double acute' ) },
  110. { character: 'ő', title: t( 'Latin small letter o with double acute' ) },
  111. { character: 'Œ', title: t( 'Latin capital ligature oe' ) },
  112. { character: 'œ', title: t( 'Latin small ligature oe' ) },
  113. { character: 'Ŕ', title: t( 'Latin capital letter r with acute' ) },
  114. { character: 'ŕ', title: t( 'Latin small letter r with acute' ) },
  115. { character: 'Ŗ', title: t( 'Latin capital letter r with cedilla' ) },
  116. { character: 'ŗ', title: t( 'Latin small letter r with cedilla' ) },
  117. { character: 'Ř', title: t( 'Latin capital letter r with caron' ) },
  118. { character: 'ř', title: t( 'Latin small letter r with caron' ) },
  119. { character: 'Ś', title: t( 'Latin capital letter s with acute' ) },
  120. { character: 'ś', title: t( 'Latin small letter s with acute' ) },
  121. { character: 'Ŝ', title: t( 'Latin capital letter s with circumflex' ) },
  122. { character: 'ŝ', title: t( 'Latin small letter s with circumflex' ) },
  123. { character: 'Ş', title: t( 'Latin capital letter s with cedilla' ) },
  124. { character: 'ş', title: t( 'Latin small letter s with cedilla' ) },
  125. { character: 'Š', title: t( 'Latin capital letter s with caron' ) },
  126. { character: 'š', title: t( 'Latin small letter s with caron' ) },
  127. { character: 'Ţ', title: t( 'Latin capital letter t with cedilla' ) },
  128. { character: 'ţ', title: t( 'Latin small letter t with cedilla' ) },
  129. { character: 'Ť', title: t( 'Latin capital letter t with caron' ) },
  130. { character: 'ť', title: t( 'Latin small letter t with caron' ) },
  131. { character: 'Ŧ', title: t( 'Latin capital letter t with stroke' ) },
  132. { character: 'ŧ', title: t( 'Latin small letter t with stroke' ) },
  133. { character: 'Ũ', title: t( 'Latin capital letter u with tilde' ) },
  134. { character: 'ũ', title: t( 'Latin small letter u with tilde' ) },
  135. { character: 'Ū', title: t( 'Latin capital letter u with macron' ) },
  136. { character: 'ū', title: t( 'Latin small letter u with macron' ) },
  137. { character: 'Ŭ', title: t( 'Latin capital letter u with breve' ) },
  138. { character: 'ŭ', title: t( 'Latin small letter u with breve' ) },
  139. { character: 'Ů', title: t( 'Latin capital letter u with ring above' ) },
  140. { character: 'ů', title: t( 'Latin small letter u with ring above' ) },
  141. { character: 'Ű', title: t( 'Latin capital letter u with double acute' ) },
  142. { character: 'ű', title: t( 'Latin small letter u with double acute' ) },
  143. { character: 'Ų', title: t( 'Latin capital letter u with ogonek' ) },
  144. { character: 'ų', title: t( 'Latin small letter u with ogonek' ) },
  145. { character: 'Ŵ', title: t( 'Latin capital letter w with circumflex' ) },
  146. { character: 'ŵ', title: t( 'Latin small letter w with circumflex' ) },
  147. { character: 'Ŷ', title: t( 'Latin capital letter y with circumflex' ) },
  148. { character: 'ŷ', title: t( 'Latin small letter y with circumflex' ) },
  149. { character: 'Ÿ', title: t( 'Latin capital letter y with diaeresis' ) },
  150. { character: 'Ź', title: t( 'Latin capital letter z with acute' ) },
  151. { character: 'ź', title: t( 'Latin small letter z with acute' ) },
  152. { character: 'Ż', title: t( 'Latin capital letter z with dot above' ) },
  153. { character: 'ż', title: t( 'Latin small letter z with dot above' ) },
  154. { character: 'Ž', title: t( 'Latin capital letter z with caron' ) },
  155. { character: 'ž', title: t( 'Latin small letter z with caron' ) },
  156. { character: 'ſ', title: t( 'Latin small letter long s' ) }
  157. ] );
  158. }
  159. }