@ckeditor/ckeditor5-special-characters 36.0.0 → 37.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,63 +2,59 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module special-characters/specialcharactersarrows
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
-
12
9
  /**
13
10
  * A plugin that provides special characters for the "Arrows" category.
14
11
  *
15
- * ClassicEditor
16
- * .create( {
17
- * plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
18
- * } )
19
- * .then( ... )
20
- * .catch( ... );
21
- *
22
- * @extends module:core/plugin~Plugin
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
23
20
  */
24
21
  export default class SpecialCharactersArrows extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName() {
29
- return 'SpecialCharactersArrows';
30
- }
31
-
32
- /**
33
- * @inheritDoc
34
- */
35
- init() {
36
- const editor = this.editor;
37
- const t = editor.t;
38
-
39
- editor.plugins.get( 'SpecialCharacters' ).addItems( 'Arrows', [
40
- { title: t( 'leftwards simple arrow' ), character: '' },
41
- { title: t( 'rightwards simple arrow' ), character: '' },
42
- { title: t( 'upwards simple arrow' ), character: '' },
43
- { title: t( 'downwards simple arrow' ), character: '' },
44
- { title: t( 'leftwards double arrow' ), character: '' },
45
- { title: t( 'rightwards double arrow' ), character: '' },
46
- { title: t( 'upwards double arrow' ), character: '' },
47
- { title: t( 'downwards double arrow' ), character: '' },
48
- { title: t( 'leftwards dashed arrow' ), character: '' },
49
- { title: t( 'rightwards dashed arrow' ), character: '' },
50
- { title: t( 'upwards dashed arrow' ), character: '' },
51
- { title: t( 'downwards dashed arrow' ), character: '' },
52
- { title: t( 'leftwards arrow to bar' ), character: '' },
53
- { title: t( 'rightwards arrow to bar' ), character: '' },
54
- { title: t( 'upwards arrow to bar' ), character: '' },
55
- { title: t( 'downwards arrow to bar' ), character: '' },
56
- { title: t( 'up down arrow with base' ), character: '' },
57
- { title: t( 'back with leftwards arrow above' ), character: '🔙' },
58
- { title: t( 'end with leftwards arrow above' ), character: '🔚' },
59
- { title: t( 'on with exclamation mark with left right arrow above' ), character: '🔛' },
60
- { title: t( 'soon with rightwards arrow above' ), character: '🔜' },
61
- { title: t( 'top with upwards arrow above' ), character: '🔝' }
62
- ], { label: t( 'Arrows' ) } );
63
- }
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName() {
26
+ return 'SpecialCharactersArrows';
27
+ }
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ init() {
32
+ const editor = this.editor;
33
+ const t = editor.t;
34
+ const plugin = editor.plugins.get('SpecialCharacters');
35
+ plugin.addItems('Arrows', [
36
+ { title: t('leftwards simple arrow'), character: '' },
37
+ { title: t('rightwards simple arrow'), character: '' },
38
+ { title: t('upwards simple arrow'), character: '' },
39
+ { title: t('downwards simple arrow'), character: '' },
40
+ { title: t('leftwards double arrow'), character: '' },
41
+ { title: t('rightwards double arrow'), character: '' },
42
+ { title: t('upwards double arrow'), character: '' },
43
+ { title: t('downwards double arrow'), character: '' },
44
+ { title: t('leftwards dashed arrow'), character: '' },
45
+ { title: t('rightwards dashed arrow'), character: '' },
46
+ { title: t('upwards dashed arrow'), character: '' },
47
+ { title: t('downwards dashed arrow'), character: '' },
48
+ { title: t('leftwards arrow to bar'), character: '' },
49
+ { title: t('rightwards arrow to bar'), character: '' },
50
+ { title: t('upwards arrow to bar'), character: '' },
51
+ { title: t('downwards arrow to bar'), character: '' },
52
+ { title: t('up down arrow with base'), character: '' },
53
+ { title: t('back with leftwards arrow above'), character: '🔙' },
54
+ { title: t('end with leftwards arrow above'), character: '🔚' },
55
+ { title: t('on with exclamation mark with left right arrow above'), character: '🔛' },
56
+ { title: t('soon with rightwards arrow above'), character: '🔜' },
57
+ { title: t('top with upwards arrow above'), character: '🔝' }
58
+ ], { label: t('Arrows') });
59
+ }
64
60
  }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module special-characters/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
+ }
52
+ declare module '@ckeditor/ckeditor5-core' {
53
+ /**
54
+ * The configuration of the {@link module:special-characters/specialcharacters~SpecialCharacters} feature.
55
+ *
56
+ * Read more in {@link module:special-characters/specialcharactersconfig~SpecialCharactersConfig}.
57
+ */
58
+ interface EditorConfig {
59
+ specialCharacters?: SpecialCharactersConfig;
60
+ }
61
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module special-characters/specialcharacterscurrency
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
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
+ init(): void;
30
+ }
31
+ declare module '@ckeditor/ckeditor5-core' {
32
+ interface PluginsMap {
33
+ [SpecialCharactersCurrency.pluginName]: SpecialCharactersCurrency;
34
+ }
35
+ }
@@ -2,77 +2,73 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module special-characters/specialcharacterscurrency
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
-
12
9
  /**
13
10
  * A plugin that provides special characters for the "Currency" category.
14
11
  *
15
- * ClassicEditor
16
- * .create( {
17
- * plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
18
- * } )
19
- * .then( ... )
20
- * .catch( ... );
21
- *
22
- * @extends module:core/plugin~Plugin
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
23
20
  */
24
21
  export default class SpecialCharactersCurrency extends Plugin {
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName() {
29
- return 'SpecialCharactersCurrency';
30
- }
31
-
32
- /**
33
- * @inheritDoc
34
- */
35
- init() {
36
- const editor = this.editor;
37
- const t = editor.t;
38
-
39
- editor.plugins.get( 'SpecialCharacters' ).addItems( 'Currency', [
40
- { character: '$', title: t( 'Dollar sign' ) },
41
- { character: '', title: t( 'Euro sign' ) },
42
- { character: '¥', title: t( 'Yen sign' ) },
43
- { character: '£', title: t( 'Pound sign' ) },
44
- { character: '¢', title: t( 'Cent sign' ) },
45
- { character: '', title: t( 'Euro-currency sign' ) },
46
- { character: '', title: t( 'Colon sign' ) },
47
- { character: '', title: t( 'Cruzeiro sign' ) },
48
- { character: '', title: t( 'French franc sign' ) },
49
- { character: '', title: t( 'Lira sign' ) },
50
- { character: '¤', title: t( 'Currency sign' ) },
51
- { character: '', title: t( 'Bitcoin sign' ) },
52
- { character: '', title: t( 'Mill sign' ) },
53
- { character: '', title: t( 'Naira sign' ) },
54
- { character: '', title: t( 'Peseta sign' ) },
55
- { character: '', title: t( 'Rupee sign' ) },
56
- { character: '', title: t( 'Won sign' ) },
57
- { character: '', title: t( 'New sheqel sign' ) },
58
- { character: '', title: t( 'Dong sign' ) },
59
- { character: '', title: t( 'Kip sign' ) },
60
- { character: '', title: t( 'Tugrik sign' ) },
61
- { character: '', title: t( 'Drachma sign' ) },
62
- { character: '', title: t( 'German penny sign' ) },
63
- { character: '', title: t( 'Peso sign' ) },
64
- { character: '', title: t( 'Guarani sign' ) },
65
- { character: '', title: t( 'Austral sign' ) },
66
- { character: '', title: t( 'Hryvnia sign' ) },
67
- { character: '', title: t( 'Cedi sign' ) },
68
- { character: '', title: t( 'Livre tournois sign' ) },
69
- { character: '', title: t( 'Spesmilo sign' ) },
70
- { character: '', title: t( 'Tenge sign' ) },
71
- { character: '', title: t( 'Indian rupee sign' ) },
72
- { character: '', title: t( 'Turkish lira sign' ) },
73
- { character: '', title: t( 'Nordic mark sign' ) },
74
- { character: '', title: t( 'Manat sign' ) },
75
- { character: '₽', title: t( 'Ruble sign' ) }
76
- ], { label: t( 'Currency' ) } );
77
- }
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName() {
26
+ return 'SpecialCharactersCurrency';
27
+ }
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ init() {
32
+ const editor = this.editor;
33
+ const t = editor.t;
34
+ const plugin = editor.plugins.get('SpecialCharacters');
35
+ plugin.addItems('Currency', [
36
+ { character: '$', title: t('Dollar sign') },
37
+ { character: '', title: t('Euro sign') },
38
+ { character: '¥', title: t('Yen sign') },
39
+ { character: '£', title: t('Pound sign') },
40
+ { character: '¢', title: t('Cent sign') },
41
+ { character: '', title: t('Euro-currency sign') },
42
+ { character: '', title: t('Colon sign') },
43
+ { character: '', title: t('Cruzeiro sign') },
44
+ { character: '', title: t('French franc sign') },
45
+ { character: '', title: t('Lira sign') },
46
+ { character: '¤', title: t('Currency sign') },
47
+ { character: '', title: t('Bitcoin sign') },
48
+ { character: '', title: t('Mill sign') },
49
+ { character: '', title: t('Naira sign') },
50
+ { character: '', title: t('Peseta sign') },
51
+ { character: '', title: t('Rupee sign') },
52
+ { character: '', title: t('Won sign') },
53
+ { character: '', title: t('New sheqel sign') },
54
+ { character: '', title: t('Dong sign') },
55
+ { character: '', title: t('Kip sign') },
56
+ { character: '', title: t('Tugrik sign') },
57
+ { character: '', title: t('Drachma sign') },
58
+ { character: '', title: t('German penny sign') },
59
+ { character: '', title: t('Peso sign') },
60
+ { character: '', title: t('Guarani sign') },
61
+ { character: '', title: t('Austral sign') },
62
+ { character: '', title: t('Hryvnia sign') },
63
+ { character: '', title: t('Cedi sign') },
64
+ { character: '', title: t('Livre tournois sign') },
65
+ { character: '', title: t('Spesmilo sign') },
66
+ { character: '', title: t('Tenge sign') },
67
+ { character: '', title: t('Indian rupee sign') },
68
+ { character: '', title: t('Turkish lira sign') },
69
+ { character: '', title: t('Nordic mark sign') },
70
+ { character: '', title: t('Manat sign') },
71
+ { character: '', title: t('Ruble sign') }
72
+ ], { label: t('Currency') });
73
+ }
78
74
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module special-characters/specialcharactersessentials
7
+ */
8
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
9
+ /**
10
+ * A plugin combining a basic set of characters for the special characters plugin.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ */
21
+ export default class SpecialCharactersEssentials extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): 'SpecialCharactersEssentials';
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get requires(): PluginDependencies;
30
+ }
31
+ declare module '@ckeditor/ckeditor5-core' {
32
+ interface PluginsMap {
33
+ [SpecialCharactersEssentials.pluginName]: SpecialCharactersEssentials;
34
+ }
35
+ }
@@ -2,42 +2,44 @@
2
2
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module special-characters/specialcharactersessentials
8
7
  */
9
-
10
8
  import { Plugin } from 'ckeditor5/src/core';
11
-
12
9
  import SpecialCharactersCurrency from './specialcharacterscurrency';
13
10
  import SpecialCharactersMathematical from './specialcharactersmathematical';
14
11
  import SpecialCharactersArrows from './specialcharactersarrows';
15
12
  import SpecialCharactersLatin from './specialcharacterslatin';
16
13
  import SpecialCharactersText from './specialcharacterstext';
17
-
18
14
  /**
19
15
  * A plugin combining a basic set of characters for the special characters plugin.
20
16
  *
21
- * ClassicEditor
22
- * .create( {
23
- * plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
24
- * } )
25
- * .then( ... )
26
- * .catch( ... );
27
- *
28
- * @extends module:core/plugin~Plugin
17
+ * ```ts
18
+ * ClassicEditor
19
+ * .create( {
20
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
21
+ * } )
22
+ * .then( ... )
23
+ * .catch( ... );
24
+ * ```
29
25
  */
30
26
  export default class SpecialCharactersEssentials extends Plugin {
31
- /**
32
- * @inheritDoc
33
- */
34
- static get requires() {
35
- return [
36
- SpecialCharactersCurrency,
37
- SpecialCharactersText,
38
- SpecialCharactersMathematical,
39
- SpecialCharactersArrows,
40
- SpecialCharactersLatin
41
- ];
42
- }
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get pluginName() {
31
+ return 'SpecialCharactersEssentials';
32
+ }
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get requires() {
37
+ return [
38
+ SpecialCharactersCurrency,
39
+ SpecialCharactersText,
40
+ SpecialCharactersMathematical,
41
+ SpecialCharactersArrows,
42
+ SpecialCharactersLatin
43
+ ];
44
+ }
43
45
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module special-characters/specialcharacterslatin
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ /**
10
+ * A plugin that provides special characters for the "Latin" category.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( {
15
+ * plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ */
21
+ export default class SpecialCharactersLatin extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): 'SpecialCharactersLatin';
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ init(): void;
30
+ }
31
+ declare module '@ckeditor/ckeditor5-core' {
32
+ interface PluginsMap {
33
+ [SpecialCharactersLatin.pluginName]: SpecialCharactersLatin;
34
+ }
35
+ }