@ckeditor/ckeditor5-font 40.0.0 → 40.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +3 -3
- package/package.json +2 -2
- package/src/augmentation.d.ts +58 -58
- package/src/augmentation.js +5 -5
- package/src/font.d.ts +33 -33
- package/src/font.js +37 -37
- package/src/fontbackgroundcolor/fontbackgroundcolorcommand.d.ts +26 -26
- package/src/fontbackgroundcolor/fontbackgroundcolorcommand.js +25 -25
- package/src/fontbackgroundcolor/fontbackgroundcolorediting.d.ts +26 -26
- package/src/fontbackgroundcolor/fontbackgroundcolorediting.js +123 -123
- package/src/fontbackgroundcolor/fontbackgroundcolorui.d.ts +22 -22
- package/src/fontbackgroundcolor/fontbackgroundcolorui.js +33 -33
- package/src/fontbackgroundcolor.d.ts +30 -30
- package/src/fontbackgroundcolor.js +34 -34
- package/src/fontcolor/fontcolorcommand.d.ts +25 -25
- package/src/fontcolor/fontcolorcommand.js +24 -24
- package/src/fontcolor/fontcolorediting.d.ts +26 -26
- package/src/fontcolor/fontcolorediting.js +134 -134
- package/src/fontcolor/fontcolorui.d.ts +22 -22
- package/src/fontcolor/fontcolorui.js +33 -33
- package/src/fontcolor.d.ts +29 -29
- package/src/fontcolor.js +33 -33
- package/src/fontcommand.d.ts +48 -48
- package/src/fontcommand.js +79 -79
- package/src/fontconfig.d.ts +373 -373
- package/src/fontconfig.js +5 -5
- package/src/fontfamily/fontfamilycommand.d.ts +25 -25
- package/src/fontfamily/fontfamilycommand.js +24 -24
- package/src/fontfamily/fontfamilyediting.d.ts +39 -39
- package/src/fontfamily/fontfamilyediting.js +115 -115
- package/src/fontfamily/fontfamilyui.d.ts +30 -30
- package/src/fontfamily/fontfamilyui.js +114 -114
- package/src/fontfamily/utils.d.ts +15 -15
- package/src/fontfamily/utils.js +80 -80
- package/src/fontfamily.d.ts +29 -29
- package/src/fontfamily.js +33 -33
- package/src/fontsize/fontsizecommand.d.ts +25 -25
- package/src/fontsize/fontsizecommand.js +24 -24
- package/src/fontsize/fontsizeediting.d.ts +44 -44
- package/src/fontsize/fontsizeediting.js +165 -165
- package/src/fontsize/fontsizeui.d.ts +31 -31
- package/src/fontsize/fontsizeui.js +122 -122
- package/src/fontsize/utils.d.ts +12 -12
- package/src/fontsize/utils.js +166 -166
- package/src/fontsize.d.ts +37 -37
- package/src/fontsize.js +43 -43
- package/src/index.d.ts +27 -27
- package/src/index.js +21 -21
- package/src/ui/colorui.d.ts +68 -68
- package/src/ui/colorui.js +130 -130
- package/src/utils.d.ts +80 -80
- package/src/utils.js +97 -97
- package/build/font.js.map +0 -1
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 font feature** – https://github.com/ckeditor/ckeditor5-font <br>
|
|
5
|
-
Copyright (c) 2003
|
|
5
|
+
Copyright (c) 2003–2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
|
8
8
|
|
|
@@ -13,11 +13,11 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi
|
|
|
13
13
|
|
|
14
14
|
The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):
|
|
15
15
|
|
|
16
|
-
* color-convert - Copyright (c) 2011
|
|
16
|
+
* color-convert - Copyright (c) 2011–2016 Heather Arthur <fayearthur@gmail.com>, copyright (c) 2016–2021 Josh Junon <josh@junon.me>.
|
|
17
17
|
* color-parse - Copyright (c) 2015 Dmitry Ivanov.
|
|
18
18
|
* vanilla-colorful - Copyright (c) 2020 Serhii Kulykov <iamkulykov@gmail.com>.
|
|
19
19
|
|
|
20
20
|
Trademarks
|
|
21
21
|
----------
|
|
22
22
|
|
|
23
|
-
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
|
23
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-font",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.1.0",
|
|
4
4
|
"description": "Font feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "40.
|
|
15
|
+
"ckeditor5": "40.1.0"
|
|
16
16
|
},
|
|
17
17
|
"author": "CKSource (http://cksource.com/)",
|
|
18
18
|
"license": "GPL-2.0-or-later",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
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 type { Font, FontBackgroundColor, FontBackgroundColorEditing, FontBackgroundColorUI, FontBackgroundColorCommand, FontColor, FontColorEditing, FontColorUI, FontColorCommand, FontColorConfig, FontFamily, FontFamilyEditing, FontFamilyUI, FontFamilyCommand, FontFamilyConfig, FontSize, FontSizeEditing, FontSizeUI, FontSizeCommand, FontSizeConfig, FONT_BACKGROUND_COLOR, FONT_COLOR, FONT_FAMILY, FONT_SIZE } from './index';
|
|
6
|
-
declare module '@ckeditor/ckeditor5-core' {
|
|
7
|
-
interface EditorConfig {
|
|
8
|
-
/**
|
|
9
|
-
* The configuration of the font background color feature.
|
|
10
|
-
* It is introduced by the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} feature.
|
|
11
|
-
*
|
|
12
|
-
* Read more in {@link module:font/fontconfig~FontColorConfig}.
|
|
13
|
-
*/
|
|
14
|
-
fontBackgroundColor?: FontColorConfig;
|
|
15
|
-
/**
|
|
16
|
-
* The configuration of the font color feature.
|
|
17
|
-
* It is introduced by the {@link module:font/fontcolor/fontcolorediting~FontColorEditing} feature.
|
|
18
|
-
*
|
|
19
|
-
* Read more in {@link module:font/fontconfig~FontColorConfig}.
|
|
20
|
-
*/
|
|
21
|
-
fontColor?: FontColorConfig;
|
|
22
|
-
/**
|
|
23
|
-
* The configuration of the font family feature.
|
|
24
|
-
* It is introduced by the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} feature.
|
|
25
|
-
*
|
|
26
|
-
* Read more in {@link module:font/fontconfig~FontFamilyConfig}.
|
|
27
|
-
*/
|
|
28
|
-
fontFamily?: FontFamilyConfig;
|
|
29
|
-
/**
|
|
30
|
-
* The configuration of the font size feature.
|
|
31
|
-
* It is introduced by the {@link module:font/fontsize/fontsizeediting~FontSizeEditing} feature.
|
|
32
|
-
*
|
|
33
|
-
* Read more in {@link module:font/fontconfig~FontSizeConfig}.
|
|
34
|
-
*/
|
|
35
|
-
fontSize?: FontSizeConfig;
|
|
36
|
-
}
|
|
37
|
-
interface PluginsMap {
|
|
38
|
-
[Font.pluginName]: Font;
|
|
39
|
-
[FontBackgroundColor.pluginName]: FontBackgroundColor;
|
|
40
|
-
[FontBackgroundColorEditing.pluginName]: FontBackgroundColorEditing;
|
|
41
|
-
[FontBackgroundColorUI.pluginName]: FontBackgroundColorUI;
|
|
42
|
-
[FontColor.pluginName]: FontColor;
|
|
43
|
-
[FontColorEditing.pluginName]: FontColorEditing;
|
|
44
|
-
[FontColorUI.pluginName]: FontColorUI;
|
|
45
|
-
[FontFamily.pluginName]: FontFamily;
|
|
46
|
-
[FontFamilyEditing.pluginName]: FontFamilyEditing;
|
|
47
|
-
[FontFamilyUI.pluginName]: FontFamilyUI;
|
|
48
|
-
[FontSize.pluginName]: FontSize;
|
|
49
|
-
[FontSizeEditing.pluginName]: FontSizeEditing;
|
|
50
|
-
[FontSizeUI.pluginName]: FontSizeUI;
|
|
51
|
-
}
|
|
52
|
-
interface CommandsMap {
|
|
53
|
-
[FONT_SIZE]: FontSizeCommand;
|
|
54
|
-
[FONT_FAMILY]: FontFamilyCommand;
|
|
55
|
-
[FONT_COLOR]: FontColorCommand;
|
|
56
|
-
[FONT_BACKGROUND_COLOR]: FontBackgroundColorCommand;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
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 type { Font, FontBackgroundColor, FontBackgroundColorEditing, FontBackgroundColorUI, FontBackgroundColorCommand, FontColor, FontColorEditing, FontColorUI, FontColorCommand, FontColorConfig, FontFamily, FontFamilyEditing, FontFamilyUI, FontFamilyCommand, FontFamilyConfig, FontSize, FontSizeEditing, FontSizeUI, FontSizeCommand, FontSizeConfig, FONT_BACKGROUND_COLOR, FONT_COLOR, FONT_FAMILY, FONT_SIZE } from './index';
|
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
7
|
+
interface EditorConfig {
|
|
8
|
+
/**
|
|
9
|
+
* The configuration of the font background color feature.
|
|
10
|
+
* It is introduced by the {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} feature.
|
|
11
|
+
*
|
|
12
|
+
* Read more in {@link module:font/fontconfig~FontColorConfig}.
|
|
13
|
+
*/
|
|
14
|
+
fontBackgroundColor?: FontColorConfig;
|
|
15
|
+
/**
|
|
16
|
+
* The configuration of the font color feature.
|
|
17
|
+
* It is introduced by the {@link module:font/fontcolor/fontcolorediting~FontColorEditing} feature.
|
|
18
|
+
*
|
|
19
|
+
* Read more in {@link module:font/fontconfig~FontColorConfig}.
|
|
20
|
+
*/
|
|
21
|
+
fontColor?: FontColorConfig;
|
|
22
|
+
/**
|
|
23
|
+
* The configuration of the font family feature.
|
|
24
|
+
* It is introduced by the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} feature.
|
|
25
|
+
*
|
|
26
|
+
* Read more in {@link module:font/fontconfig~FontFamilyConfig}.
|
|
27
|
+
*/
|
|
28
|
+
fontFamily?: FontFamilyConfig;
|
|
29
|
+
/**
|
|
30
|
+
* The configuration of the font size feature.
|
|
31
|
+
* It is introduced by the {@link module:font/fontsize/fontsizeediting~FontSizeEditing} feature.
|
|
32
|
+
*
|
|
33
|
+
* Read more in {@link module:font/fontconfig~FontSizeConfig}.
|
|
34
|
+
*/
|
|
35
|
+
fontSize?: FontSizeConfig;
|
|
36
|
+
}
|
|
37
|
+
interface PluginsMap {
|
|
38
|
+
[Font.pluginName]: Font;
|
|
39
|
+
[FontBackgroundColor.pluginName]: FontBackgroundColor;
|
|
40
|
+
[FontBackgroundColorEditing.pluginName]: FontBackgroundColorEditing;
|
|
41
|
+
[FontBackgroundColorUI.pluginName]: FontBackgroundColorUI;
|
|
42
|
+
[FontColor.pluginName]: FontColor;
|
|
43
|
+
[FontColorEditing.pluginName]: FontColorEditing;
|
|
44
|
+
[FontColorUI.pluginName]: FontColorUI;
|
|
45
|
+
[FontFamily.pluginName]: FontFamily;
|
|
46
|
+
[FontFamilyEditing.pluginName]: FontFamilyEditing;
|
|
47
|
+
[FontFamilyUI.pluginName]: FontFamilyUI;
|
|
48
|
+
[FontSize.pluginName]: FontSize;
|
|
49
|
+
[FontSizeEditing.pluginName]: FontSizeEditing;
|
|
50
|
+
[FontSizeUI.pluginName]: FontSizeUI;
|
|
51
|
+
}
|
|
52
|
+
interface CommandsMap {
|
|
53
|
+
[FONT_SIZE]: FontSizeCommand;
|
|
54
|
+
[FONT_FAMILY]: FontFamilyCommand;
|
|
55
|
+
[FONT_COLOR]: FontColorCommand;
|
|
56
|
+
[FONT_BACKGROUND_COLOR]: FontBackgroundColorCommand;
|
|
57
|
+
}
|
|
58
|
+
}
|
package/src/augmentation.js
CHANGED
|
@@ -1,5 +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 {};
|
|
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 {};
|
package/src/font.d.ts
CHANGED
|
@@ -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/font
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import FontFamily from './fontfamily';
|
|
10
|
-
import FontSize from './fontsize';
|
|
11
|
-
import FontColor from './fontcolor';
|
|
12
|
-
import FontBackgroundColor from './fontbackgroundcolor';
|
|
13
|
-
/**
|
|
14
|
-
* A plugin that enables a set of text styling features:
|
|
15
|
-
*
|
|
16
|
-
* * {@link module:font/fontsize~FontSize},
|
|
17
|
-
* * {@link module:font/fontfamily~FontFamily}.
|
|
18
|
-
* * {@link module:font/fontcolor~FontColor},
|
|
19
|
-
* * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.
|
|
20
|
-
*
|
|
21
|
-
* For a detailed overview, check the {@glink features/font Font feature} documentation
|
|
22
|
-
* and the {@glink api/font package page}.
|
|
23
|
-
*/
|
|
24
|
-
export default class Font extends Plugin {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
static get requires(): readonly [typeof FontFamily, typeof FontSize, typeof FontColor, typeof FontBackgroundColor];
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
static get pluginName(): "Font";
|
|
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/font
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import FontFamily from './fontfamily';
|
|
10
|
+
import FontSize from './fontsize';
|
|
11
|
+
import FontColor from './fontcolor';
|
|
12
|
+
import FontBackgroundColor from './fontbackgroundcolor';
|
|
13
|
+
/**
|
|
14
|
+
* A plugin that enables a set of text styling features:
|
|
15
|
+
*
|
|
16
|
+
* * {@link module:font/fontsize~FontSize},
|
|
17
|
+
* * {@link module:font/fontfamily~FontFamily}.
|
|
18
|
+
* * {@link module:font/fontcolor~FontColor},
|
|
19
|
+
* * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.
|
|
20
|
+
*
|
|
21
|
+
* For a detailed overview, check the {@glink features/font Font feature} documentation
|
|
22
|
+
* and the {@glink api/font package page}.
|
|
23
|
+
*/
|
|
24
|
+
export default class Font extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get requires(): readonly [typeof FontFamily, typeof FontSize, typeof FontColor, typeof FontBackgroundColor];
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get pluginName(): "Font";
|
|
33
|
+
}
|
package/src/font.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
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/font
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import FontFamily from './fontfamily';
|
|
10
|
-
import FontSize from './fontsize';
|
|
11
|
-
import FontColor from './fontcolor';
|
|
12
|
-
import FontBackgroundColor from './fontbackgroundcolor';
|
|
13
|
-
/**
|
|
14
|
-
* A plugin that enables a set of text styling features:
|
|
15
|
-
*
|
|
16
|
-
* * {@link module:font/fontsize~FontSize},
|
|
17
|
-
* * {@link module:font/fontfamily~FontFamily}.
|
|
18
|
-
* * {@link module:font/fontcolor~FontColor},
|
|
19
|
-
* * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.
|
|
20
|
-
*
|
|
21
|
-
* For a detailed overview, check the {@glink features/font Font feature} documentation
|
|
22
|
-
* and the {@glink api/font package page}.
|
|
23
|
-
*/
|
|
24
|
-
export default class Font extends Plugin {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
static get requires() {
|
|
29
|
-
return [FontFamily, FontSize, FontColor, FontBackgroundColor];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @inheritDoc
|
|
33
|
-
*/
|
|
34
|
-
static get pluginName() {
|
|
35
|
-
return 'Font';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
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/font
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import FontFamily from './fontfamily';
|
|
10
|
+
import FontSize from './fontsize';
|
|
11
|
+
import FontColor from './fontcolor';
|
|
12
|
+
import FontBackgroundColor from './fontbackgroundcolor';
|
|
13
|
+
/**
|
|
14
|
+
* A plugin that enables a set of text styling features:
|
|
15
|
+
*
|
|
16
|
+
* * {@link module:font/fontsize~FontSize},
|
|
17
|
+
* * {@link module:font/fontfamily~FontFamily}.
|
|
18
|
+
* * {@link module:font/fontcolor~FontColor},
|
|
19
|
+
* * {@link module:font/fontbackgroundcolor~FontBackgroundColor}.
|
|
20
|
+
*
|
|
21
|
+
* For a detailed overview, check the {@glink features/font Font feature} documentation
|
|
22
|
+
* and the {@glink api/font package page}.
|
|
23
|
+
*/
|
|
24
|
+
export default class Font extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get requires() {
|
|
29
|
+
return [FontFamily, FontSize, FontColor, FontBackgroundColor];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get pluginName() {
|
|
35
|
+
return 'Font';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -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
|
+
}
|