@ckeditor/ckeditor5-font 39.0.1 → 40.0.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 (113) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/LICENSE.md +1 -1
  3. package/README.md +3 -3
  4. package/build/font.js.map +1 -0
  5. package/lang/translations/ar.po +1 -0
  6. package/lang/translations/az.po +1 -0
  7. package/lang/translations/bg.po +1 -0
  8. package/lang/translations/bn.po +1 -0
  9. package/lang/translations/bs.po +1 -0
  10. package/lang/translations/ca.po +1 -0
  11. package/lang/translations/cs.po +1 -0
  12. package/lang/translations/da.po +1 -0
  13. package/lang/translations/de-ch.po +1 -0
  14. package/lang/translations/de.po +1 -0
  15. package/lang/translations/el.po +1 -0
  16. package/lang/translations/en-au.po +1 -0
  17. package/lang/translations/en-gb.po +1 -0
  18. package/lang/translations/en.po +1 -0
  19. package/lang/translations/es.po +1 -0
  20. package/lang/translations/et.po +1 -0
  21. package/lang/translations/fa.po +1 -0
  22. package/lang/translations/fi.po +1 -0
  23. package/lang/translations/fr.po +1 -0
  24. package/lang/translations/gl.po +1 -0
  25. package/lang/translations/he.po +1 -0
  26. package/lang/translations/hi.po +1 -0
  27. package/lang/translations/hr.po +1 -0
  28. package/lang/translations/hu.po +1 -0
  29. package/lang/translations/id.po +1 -0
  30. package/lang/translations/it.po +1 -0
  31. package/lang/translations/ja.po +1 -0
  32. package/lang/translations/jv.po +1 -0
  33. package/lang/translations/ko.po +1 -0
  34. package/lang/translations/ku.po +1 -0
  35. package/lang/translations/lt.po +1 -0
  36. package/lang/translations/lv.po +1 -0
  37. package/lang/translations/ms.po +1 -0
  38. package/lang/translations/nb.po +1 -0
  39. package/lang/translations/ne.po +1 -0
  40. package/lang/translations/nl.po +1 -0
  41. package/lang/translations/no.po +1 -0
  42. package/lang/translations/pl.po +1 -0
  43. package/lang/translations/pt-br.po +1 -0
  44. package/lang/translations/pt.po +1 -0
  45. package/lang/translations/ro.po +1 -0
  46. package/lang/translations/ru.po +1 -0
  47. package/lang/translations/sk.po +1 -0
  48. package/lang/translations/sl.po +1 -0
  49. package/lang/translations/sq.po +1 -0
  50. package/lang/translations/sr-latn.po +1 -0
  51. package/lang/translations/sr.po +1 -0
  52. package/lang/translations/sv.po +1 -0
  53. package/lang/translations/th.po +1 -0
  54. package/lang/translations/tk.po +1 -0
  55. package/lang/translations/tr.po +1 -0
  56. package/lang/translations/ug.po +1 -0
  57. package/lang/translations/uk.po +1 -0
  58. package/lang/translations/ur.po +1 -0
  59. package/lang/translations/uz.po +1 -0
  60. package/lang/translations/vi.po +1 -0
  61. package/lang/translations/zh-cn.po +1 -0
  62. package/lang/translations/zh.po +1 -0
  63. package/package.json +2 -6
  64. package/src/augmentation.d.ts +58 -58
  65. package/src/augmentation.js +5 -5
  66. package/src/font.d.ts +33 -33
  67. package/src/font.js +37 -37
  68. package/src/fontbackgroundcolor/fontbackgroundcolorcommand.d.ts +26 -26
  69. package/src/fontbackgroundcolor/fontbackgroundcolorcommand.js +25 -25
  70. package/src/fontbackgroundcolor/fontbackgroundcolorediting.d.ts +26 -26
  71. package/src/fontbackgroundcolor/fontbackgroundcolorediting.js +123 -123
  72. package/src/fontbackgroundcolor/fontbackgroundcolorui.d.ts +22 -22
  73. package/src/fontbackgroundcolor/fontbackgroundcolorui.js +33 -33
  74. package/src/fontbackgroundcolor.d.ts +30 -30
  75. package/src/fontbackgroundcolor.js +34 -34
  76. package/src/fontcolor/fontcolorcommand.d.ts +25 -25
  77. package/src/fontcolor/fontcolorcommand.js +24 -24
  78. package/src/fontcolor/fontcolorediting.d.ts +26 -26
  79. package/src/fontcolor/fontcolorediting.js +134 -134
  80. package/src/fontcolor/fontcolorui.d.ts +22 -22
  81. package/src/fontcolor/fontcolorui.js +33 -33
  82. package/src/fontcolor.d.ts +29 -29
  83. package/src/fontcolor.js +33 -33
  84. package/src/fontcommand.d.ts +48 -48
  85. package/src/fontcommand.js +79 -79
  86. package/src/fontconfig.d.ts +373 -373
  87. package/src/fontconfig.js +5 -5
  88. package/src/fontfamily/fontfamilycommand.d.ts +25 -25
  89. package/src/fontfamily/fontfamilycommand.js +24 -24
  90. package/src/fontfamily/fontfamilyediting.d.ts +39 -39
  91. package/src/fontfamily/fontfamilyediting.js +115 -115
  92. package/src/fontfamily/fontfamilyui.d.ts +30 -30
  93. package/src/fontfamily/fontfamilyui.js +114 -114
  94. package/src/fontfamily/utils.d.ts +15 -15
  95. package/src/fontfamily/utils.js +80 -80
  96. package/src/fontfamily.d.ts +29 -29
  97. package/src/fontfamily.js +33 -33
  98. package/src/fontsize/fontsizecommand.d.ts +25 -25
  99. package/src/fontsize/fontsizecommand.js +24 -24
  100. package/src/fontsize/fontsizeediting.d.ts +44 -44
  101. package/src/fontsize/fontsizeediting.js +165 -165
  102. package/src/fontsize/fontsizeui.d.ts +31 -31
  103. package/src/fontsize/fontsizeui.js +122 -122
  104. package/src/fontsize/utils.d.ts +12 -12
  105. package/src/fontsize/utils.js +166 -166
  106. package/src/fontsize.d.ts +37 -37
  107. package/src/fontsize.js +43 -43
  108. package/src/index.d.ts +27 -27
  109. package/src/index.js +21 -21
  110. package/src/ui/colorui.d.ts +68 -68
  111. package/src/ui/colorui.js +130 -130
  112. package/src/utils.d.ts +80 -80
  113. package/src/utils.js +97 -97
@@ -1,26 +1,26 @@
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 font/fontbackgroundcolor/fontbackgroundcolorcommand
7
- */
8
- import type { Editor } from 'ckeditor5/src/core';
9
- import FontCommand from '../fontcommand';
10
- /**
11
- * The font background color command. It is used by
12
- * {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}
13
- * to apply the font background color.
14
- *
15
- * ```ts
16
- * editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );
17
- * ```
18
- *
19
- * **Note**: Executing the command with the `null` value removes the attribute from the model.
20
- */
21
- export default class FontBackgroundColorCommand extends FontCommand {
22
- /**
23
- * @inheritDoc
24
- */
25
- constructor(editor: Editor);
26
- }
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 font/fontbackgroundcolor/fontbackgroundcolorcommand
7
+ */
8
+ import type { Editor } from 'ckeditor5/src/core';
9
+ import FontCommand from '../fontcommand';
10
+ /**
11
+ * The font background color command. It is used by
12
+ * {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}
13
+ * to apply the font background color.
14
+ *
15
+ * ```ts
16
+ * editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );
17
+ * ```
18
+ *
19
+ * **Note**: Executing the command with the `null` value removes the attribute from the model.
20
+ */
21
+ export default class FontBackgroundColorCommand extends FontCommand {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ constructor(editor: Editor);
26
+ }
@@ -1,25 +1,25 @@
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
- import FontCommand from '../fontcommand';
6
- import { FONT_BACKGROUND_COLOR } from '../utils';
7
- /**
8
- * The font background color command. It is used by
9
- * {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}
10
- * to apply the font background color.
11
- *
12
- * ```ts
13
- * editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );
14
- * ```
15
- *
16
- * **Note**: Executing the command with the `null` value removes the attribute from the model.
17
- */
18
- export default class FontBackgroundColorCommand extends FontCommand {
19
- /**
20
- * @inheritDoc
21
- */
22
- constructor(editor) {
23
- super(editor, FONT_BACKGROUND_COLOR);
24
- }
25
- }
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
+ import FontCommand from '../fontcommand';
6
+ import { FONT_BACKGROUND_COLOR } from '../utils';
7
+ /**
8
+ * The font background color command. It is used by
9
+ * {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing}
10
+ * to apply the font background color.
11
+ *
12
+ * ```ts
13
+ * editor.execute( 'fontBackgroundColor', { value: 'rgb(250, 20, 20)' } );
14
+ * ```
15
+ *
16
+ * **Note**: Executing the command with the `null` value removes the attribute from the model.
17
+ */
18
+ export default class FontBackgroundColorCommand extends FontCommand {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ constructor(editor) {
23
+ super(editor, FONT_BACKGROUND_COLOR);
24
+ }
25
+ }
@@ -1,26 +1,26 @@
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 font/fontbackgroundcolor/fontbackgroundcolorediting
7
- */
8
- import { Plugin, type Editor } from 'ckeditor5/src/core';
9
- /**
10
- * The font background color editing feature.
11
- *
12
- * It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and
13
- * the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders
14
- * in the {@link module:engine/view/view view} as a `<span>` element (`<span style="background-color: ...">`),
15
- * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.
16
- */
17
- export default class FontBackgroundColorEditing extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get pluginName(): "FontBackgroundColorEditing";
22
- /**
23
- * @inheritDoc
24
- */
25
- constructor(editor: Editor);
26
- }
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 font/fontbackgroundcolor/fontbackgroundcolorediting
7
+ */
8
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
9
+ /**
10
+ * The font background color editing feature.
11
+ *
12
+ * It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and
13
+ * the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders
14
+ * in the {@link module:engine/view/view view} as a `<span>` element (`<span style="background-color: ...">`),
15
+ * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.
16
+ */
17
+ export default class FontBackgroundColorEditing extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): "FontBackgroundColorEditing";
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ constructor(editor: Editor);
26
+ }
@@ -1,123 +1,123 @@
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 font/fontbackgroundcolor/fontbackgroundcolorediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { addBackgroundRules } from 'ckeditor5/src/engine';
10
- import FontBackgroundColorCommand from './fontbackgroundcolorcommand';
11
- import { FONT_BACKGROUND_COLOR, renderDowncastElement, renderUpcastAttribute } from '../utils';
12
- /**
13
- * The font background color editing feature.
14
- *
15
- * It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and
16
- * the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders
17
- * in the {@link module:engine/view/view view} as a `<span>` element (`<span style="background-color: ...">`),
18
- * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.
19
- */
20
- export default class FontBackgroundColorEditing extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName() {
25
- return 'FontBackgroundColorEditing';
26
- }
27
- /**
28
- * @inheritDoc
29
- */
30
- constructor(editor) {
31
- super(editor);
32
- editor.config.define(FONT_BACKGROUND_COLOR, {
33
- colors: [
34
- {
35
- color: 'hsl(0, 0%, 0%)',
36
- label: 'Black'
37
- },
38
- {
39
- color: 'hsl(0, 0%, 30%)',
40
- label: 'Dim grey'
41
- },
42
- {
43
- color: 'hsl(0, 0%, 60%)',
44
- label: 'Grey'
45
- },
46
- {
47
- color: 'hsl(0, 0%, 90%)',
48
- label: 'Light grey'
49
- },
50
- {
51
- color: 'hsl(0, 0%, 100%)',
52
- label: 'White',
53
- hasBorder: true
54
- },
55
- {
56
- color: 'hsl(0, 75%, 60%)',
57
- label: 'Red'
58
- },
59
- {
60
- color: 'hsl(30, 75%, 60%)',
61
- label: 'Orange'
62
- },
63
- {
64
- color: 'hsl(60, 75%, 60%)',
65
- label: 'Yellow'
66
- },
67
- {
68
- color: 'hsl(90, 75%, 60%)',
69
- label: 'Light green'
70
- },
71
- {
72
- color: 'hsl(120, 75%, 60%)',
73
- label: 'Green'
74
- },
75
- {
76
- color: 'hsl(150, 75%, 60%)',
77
- label: 'Aquamarine'
78
- },
79
- {
80
- color: 'hsl(180, 75%, 60%)',
81
- label: 'Turquoise'
82
- },
83
- {
84
- color: 'hsl(210, 75%, 60%)',
85
- label: 'Light blue'
86
- },
87
- {
88
- color: 'hsl(240, 75%, 60%)',
89
- label: 'Blue'
90
- },
91
- {
92
- color: 'hsl(270, 75%, 60%)',
93
- label: 'Purple'
94
- }
95
- ],
96
- columns: 5
97
- });
98
- editor.data.addStyleProcessorRules(addBackgroundRules);
99
- editor.conversion.for('upcast').elementToAttribute({
100
- view: {
101
- name: 'span',
102
- styles: {
103
- 'background-color': /[\s\S]+/
104
- }
105
- },
106
- model: {
107
- key: FONT_BACKGROUND_COLOR,
108
- value: renderUpcastAttribute('background-color')
109
- }
110
- });
111
- editor.conversion.for('downcast').attributeToElement({
112
- model: FONT_BACKGROUND_COLOR,
113
- view: renderDowncastElement('background-color')
114
- });
115
- editor.commands.add(FONT_BACKGROUND_COLOR, new FontBackgroundColorCommand(editor));
116
- // Allow the font backgroundColor attribute on text nodes.
117
- editor.model.schema.extend('$text', { allowAttributes: FONT_BACKGROUND_COLOR });
118
- editor.model.schema.setAttributeProperties(FONT_BACKGROUND_COLOR, {
119
- isFormatting: true,
120
- copyOnEnter: true
121
- });
122
- }
123
- }
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 font/fontbackgroundcolor/fontbackgroundcolorediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import { addBackgroundRules } from 'ckeditor5/src/engine';
10
+ import FontBackgroundColorCommand from './fontbackgroundcolorcommand';
11
+ import { FONT_BACKGROUND_COLOR, renderDowncastElement, renderUpcastAttribute } from '../utils';
12
+ /**
13
+ * The font background color editing feature.
14
+ *
15
+ * It introduces the {@link module:font/fontbackgroundcolor/fontbackgroundcolorcommand~FontBackgroundColorCommand command} and
16
+ * the `fontBackgroundColor` attribute in the {@link module:engine/model/model~Model model} which renders
17
+ * in the {@link module:engine/view/view view} as a `<span>` element (`<span style="background-color: ...">`),
18
+ * depending on the {@link module:font/fontconfig~FontColorConfig configuration}.
19
+ */
20
+ export default class FontBackgroundColorEditing extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName() {
25
+ return 'FontBackgroundColorEditing';
26
+ }
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ constructor(editor) {
31
+ super(editor);
32
+ editor.config.define(FONT_BACKGROUND_COLOR, {
33
+ colors: [
34
+ {
35
+ color: 'hsl(0, 0%, 0%)',
36
+ label: 'Black'
37
+ },
38
+ {
39
+ color: 'hsl(0, 0%, 30%)',
40
+ label: 'Dim grey'
41
+ },
42
+ {
43
+ color: 'hsl(0, 0%, 60%)',
44
+ label: 'Grey'
45
+ },
46
+ {
47
+ color: 'hsl(0, 0%, 90%)',
48
+ label: 'Light grey'
49
+ },
50
+ {
51
+ color: 'hsl(0, 0%, 100%)',
52
+ label: 'White',
53
+ hasBorder: true
54
+ },
55
+ {
56
+ color: 'hsl(0, 75%, 60%)',
57
+ label: 'Red'
58
+ },
59
+ {
60
+ color: 'hsl(30, 75%, 60%)',
61
+ label: 'Orange'
62
+ },
63
+ {
64
+ color: 'hsl(60, 75%, 60%)',
65
+ label: 'Yellow'
66
+ },
67
+ {
68
+ color: 'hsl(90, 75%, 60%)',
69
+ label: 'Light green'
70
+ },
71
+ {
72
+ color: 'hsl(120, 75%, 60%)',
73
+ label: 'Green'
74
+ },
75
+ {
76
+ color: 'hsl(150, 75%, 60%)',
77
+ label: 'Aquamarine'
78
+ },
79
+ {
80
+ color: 'hsl(180, 75%, 60%)',
81
+ label: 'Turquoise'
82
+ },
83
+ {
84
+ color: 'hsl(210, 75%, 60%)',
85
+ label: 'Light blue'
86
+ },
87
+ {
88
+ color: 'hsl(240, 75%, 60%)',
89
+ label: 'Blue'
90
+ },
91
+ {
92
+ color: 'hsl(270, 75%, 60%)',
93
+ label: 'Purple'
94
+ }
95
+ ],
96
+ columns: 5
97
+ });
98
+ editor.data.addStyleProcessorRules(addBackgroundRules);
99
+ editor.conversion.for('upcast').elementToAttribute({
100
+ view: {
101
+ name: 'span',
102
+ styles: {
103
+ 'background-color': /[\s\S]+/
104
+ }
105
+ },
106
+ model: {
107
+ key: FONT_BACKGROUND_COLOR,
108
+ value: renderUpcastAttribute('background-color')
109
+ }
110
+ });
111
+ editor.conversion.for('downcast').attributeToElement({
112
+ model: FONT_BACKGROUND_COLOR,
113
+ view: renderDowncastElement('background-color')
114
+ });
115
+ editor.commands.add(FONT_BACKGROUND_COLOR, new FontBackgroundColorCommand(editor));
116
+ // Allow the font backgroundColor attribute on text nodes.
117
+ editor.model.schema.extend('$text', { allowAttributes: FONT_BACKGROUND_COLOR });
118
+ editor.model.schema.setAttributeProperties(FONT_BACKGROUND_COLOR, {
119
+ isFormatting: true,
120
+ copyOnEnter: true
121
+ });
122
+ }
123
+ }
@@ -1,22 +1,22 @@
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 font/fontbackgroundcolor/fontbackgroundcolorui
7
- */
8
- import ColorUI from '../ui/colorui';
9
- import type { Editor } from 'ckeditor5/src/core';
10
- /**
11
- * The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.
12
- */
13
- export default class FontBackgroundColorUI extends ColorUI {
14
- /**
15
- * @inheritDoc
16
- */
17
- constructor(editor: Editor);
18
- /**
19
- * @inheritDoc
20
- */
21
- static get pluginName(): "FontBackgroundColorUI";
22
- }
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 font/fontbackgroundcolor/fontbackgroundcolorui
7
+ */
8
+ import ColorUI from '../ui/colorui';
9
+ import type { Editor } from 'ckeditor5/src/core';
10
+ /**
11
+ * The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.
12
+ */
13
+ export default class FontBackgroundColorUI extends ColorUI {
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ constructor(editor: Editor);
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): "FontBackgroundColorUI";
22
+ }
@@ -1,33 +1,33 @@
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 font/fontbackgroundcolor/fontbackgroundcolorui
7
- */
8
- import ColorUI from '../ui/colorui';
9
- import { FONT_BACKGROUND_COLOR } from '../utils';
10
- import fontBackgroundColorIcon from '../../theme/icons/font-background.svg';
11
- /**
12
- * The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.
13
- */
14
- export default class FontBackgroundColorUI extends ColorUI {
15
- /**
16
- * @inheritDoc
17
- */
18
- constructor(editor) {
19
- const t = editor.locale.t;
20
- super(editor, {
21
- commandName: FONT_BACKGROUND_COLOR,
22
- componentName: FONT_BACKGROUND_COLOR,
23
- icon: fontBackgroundColorIcon,
24
- dropdownLabel: t('Font Background Color')
25
- });
26
- }
27
- /**
28
- * @inheritDoc
29
- */
30
- static get pluginName() {
31
- return 'FontBackgroundColorUI';
32
- }
33
- }
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 font/fontbackgroundcolor/fontbackgroundcolorui
7
+ */
8
+ import ColorUI from '../ui/colorui';
9
+ import { FONT_BACKGROUND_COLOR } from '../utils';
10
+ import fontBackgroundColorIcon from '../../theme/icons/font-background.svg';
11
+ /**
12
+ * The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.
13
+ */
14
+ export default class FontBackgroundColorUI extends ColorUI {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ constructor(editor) {
19
+ const t = editor.locale.t;
20
+ super(editor, {
21
+ commandName: FONT_BACKGROUND_COLOR,
22
+ componentName: FONT_BACKGROUND_COLOR,
23
+ icon: fontBackgroundColorIcon,
24
+ dropdownLabel: t('Font Background Color')
25
+ });
26
+ }
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get pluginName() {
31
+ return 'FontBackgroundColorUI';
32
+ }
33
+ }
@@ -1,30 +1,30 @@
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 font/fontbackgroundcolor
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import FontBackgroundColorEditing from './fontbackgroundcolor/fontbackgroundcolorediting';
10
- import FontBackgroundColorUI from './fontbackgroundcolor/fontbackgroundcolorui';
11
- /**
12
- * The font background color plugin.
13
- *
14
- * For a detailed overview, check the {@glink features/font font feature} documentation
15
- * and the {@glink api/font package page}.
16
- *
17
- * This is a "glue" plugin which loads
18
- * the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and
19
- * {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.
20
- */
21
- export default class FontBackgroundColor extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires(): readonly [typeof FontBackgroundColorEditing, typeof FontBackgroundColorUI];
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName(): "FontBackgroundColor";
30
- }
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 font/fontbackgroundcolor
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import FontBackgroundColorEditing from './fontbackgroundcolor/fontbackgroundcolorediting';
10
+ import FontBackgroundColorUI from './fontbackgroundcolor/fontbackgroundcolorui';
11
+ /**
12
+ * The font background color plugin.
13
+ *
14
+ * For a detailed overview, check the {@glink features/font font feature} documentation
15
+ * and the {@glink api/font package page}.
16
+ *
17
+ * This is a "glue" plugin which loads
18
+ * the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and
19
+ * {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.
20
+ */
21
+ export default class FontBackgroundColor extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires(): readonly [typeof FontBackgroundColorEditing, typeof FontBackgroundColorUI];
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "FontBackgroundColor";
30
+ }
@@ -1,34 +1,34 @@
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 font/fontbackgroundcolor
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import FontBackgroundColorEditing from './fontbackgroundcolor/fontbackgroundcolorediting';
10
- import FontBackgroundColorUI from './fontbackgroundcolor/fontbackgroundcolorui';
11
- /**
12
- * The font background color plugin.
13
- *
14
- * For a detailed overview, check the {@glink features/font font feature} documentation
15
- * and the {@glink api/font package page}.
16
- *
17
- * This is a "glue" plugin which loads
18
- * the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and
19
- * {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.
20
- */
21
- export default class FontBackgroundColor extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires() {
26
- return [FontBackgroundColorEditing, FontBackgroundColorUI];
27
- }
28
- /**
29
- * @inheritDoc
30
- */
31
- static get pluginName() {
32
- return 'FontBackgroundColor';
33
- }
34
- }
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 font/fontbackgroundcolor
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import FontBackgroundColorEditing from './fontbackgroundcolor/fontbackgroundcolorediting';
10
+ import FontBackgroundColorUI from './fontbackgroundcolor/fontbackgroundcolorui';
11
+ /**
12
+ * The font background color plugin.
13
+ *
14
+ * For a detailed overview, check the {@glink features/font font feature} documentation
15
+ * and the {@glink api/font package page}.
16
+ *
17
+ * This is a "glue" plugin which loads
18
+ * the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} and
19
+ * {@link module:font/fontbackgroundcolor/fontbackgroundcolorui~FontBackgroundColorUI} features in the editor.
20
+ */
21
+ export default class FontBackgroundColor extends Plugin {
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires() {
26
+ return [FontBackgroundColorEditing, FontBackgroundColorUI];
27
+ }
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get pluginName() {
32
+ return 'FontBackgroundColor';
33
+ }
34
+ }