@ckeditor/ckeditor5-font 44.3.0 → 45.0.0-alpha.1
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/build/font.js +1 -1
- package/build/translations/be.js +1 -0
- package/ckeditor5-metadata.json +4 -4
- package/dist/index.js +7 -14
- package/dist/index.js.map +1 -1
- package/dist/translations/be.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- package/lang/translations/be.po +52 -0
- package/package.json +7 -6
- package/src/fontbackgroundcolor/fontbackgroundcolorui.d.ts +0 -3
- package/src/fontbackgroundcolor/fontbackgroundcolorui.js +2 -2
- package/src/fontcolor/fontcolorui.d.ts +0 -3
- package/src/fontcolor/fontcolorui.js +2 -2
- package/src/fontcommand.js +4 -0
- package/src/fontfamily/fontfamilyui.js +3 -3
- package/src/fontsize/fontsizeui.js +3 -3
- package/src/ui/colorui.js +21 -0
- package/theme/icons/font-background.svg +0 -1
- package/theme/icons/font-color.svg +0 -1
- package/theme/icons/font-family.svg +0 -1
- package/theme/icons/font-size.svg +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Translations } from '@ckeditor/ckeditor5-utils';
|
|
7
|
+
declare const translations: Translations;
|
|
8
|
+
export default translations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
export default {"be":{"dictionary":{"Font Size":"Памер шрыфту","Tiny":"Вельмі малы","Small":"Мелкі","Big":"Крупны","Huge":"Вельмі крупны","Font Family":"Сям'я шрыфтаў","Default":"Па ўмове","Font Color":"Колер шрыфту","Font Background Color":"Колер фону шрыфту","Document colors":"Колеры дакумента"},getPluralForm(n){return (n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);}}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
( e => {
|
|
7
|
+
const { [ 'be' ]: { dictionary, getPluralForm } } = {"be":{"dictionary":{"Font Size":"Памер шрыфту","Tiny":"Вельмі малы","Small":"Мелкі","Big":"Крупны","Huge":"Вельмі крупны","Font Family":"Сям'я шрыфтаў","Default":"Па ўмове","Font Color":"Колер шрыфту","Font Background Color":"Колер фону шрыфту","Document colors":"Колеры дакумента"},getPluralForm(n){return (n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);}}};
|
|
8
|
+
e[ 'be' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
+
e[ 'be' ].dictionary = Object.assign( e[ 'be' ].dictionary, dictionary );
|
|
10
|
+
e[ 'be' ].getPluralForm = getPluralForm;
|
|
11
|
+
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
+
#
|
|
5
|
+
# Check out the official contributor's guide:
|
|
6
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
+
#
|
|
8
|
+
msgid ""
|
|
9
|
+
msgstr ""
|
|
10
|
+
"Language: be\n"
|
|
11
|
+
"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n"
|
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
+
|
|
14
|
+
msgctxt "Tooltip for the font size dropdown."
|
|
15
|
+
msgid "Font Size"
|
|
16
|
+
msgstr "Памер шрыфту"
|
|
17
|
+
|
|
18
|
+
msgctxt "Dropdown option label for the 'tiny' font size preset."
|
|
19
|
+
msgid "Tiny"
|
|
20
|
+
msgstr "Вельмі малы"
|
|
21
|
+
|
|
22
|
+
msgctxt "Dropdown option label for the 'small' font size preset."
|
|
23
|
+
msgid "Small"
|
|
24
|
+
msgstr "Мелкі"
|
|
25
|
+
|
|
26
|
+
msgctxt "Dropdown option label for the 'big' font size preset."
|
|
27
|
+
msgid "Big"
|
|
28
|
+
msgstr "Крупны"
|
|
29
|
+
|
|
30
|
+
msgctxt "Dropdown option label for the 'huge' font size preset."
|
|
31
|
+
msgid "Huge"
|
|
32
|
+
msgstr "Вельмі крупны"
|
|
33
|
+
|
|
34
|
+
msgctxt "Tooltip for the font family dropdown."
|
|
35
|
+
msgid "Font Family"
|
|
36
|
+
msgstr "Сям'я шрыфтаў"
|
|
37
|
+
|
|
38
|
+
msgctxt "Dropdown option label for the default font family."
|
|
39
|
+
msgid "Default"
|
|
40
|
+
msgstr "Па ўмове"
|
|
41
|
+
|
|
42
|
+
msgctxt "Label of a button that allows selecting a font color."
|
|
43
|
+
msgid "Font Color"
|
|
44
|
+
msgstr "Колер шрыфту"
|
|
45
|
+
|
|
46
|
+
msgctxt "Label of a button that allows selecting a font background color."
|
|
47
|
+
msgid "Font Background Color"
|
|
48
|
+
msgstr "Колер фону шрыфту"
|
|
49
|
+
|
|
50
|
+
msgctxt "Title of a color picker section containing the colors currently used in the document."
|
|
51
|
+
msgid "Document colors"
|
|
52
|
+
msgstr "Колеры дакумента"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-font",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "45.0.0-alpha.1",
|
|
4
4
|
"description": "Font feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-core": "
|
|
17
|
-
"@ckeditor/ckeditor5-engine": "
|
|
18
|
-
"@ckeditor/ckeditor5-
|
|
19
|
-
"@ckeditor/ckeditor5-
|
|
20
|
-
"ckeditor5": "
|
|
16
|
+
"@ckeditor/ckeditor5-core": "45.0.0-alpha.1",
|
|
17
|
+
"@ckeditor/ckeditor5-engine": "45.0.0-alpha.1",
|
|
18
|
+
"@ckeditor/ckeditor5-icons": "45.0.0-alpha.1",
|
|
19
|
+
"@ckeditor/ckeditor5-ui": "45.0.0-alpha.1",
|
|
20
|
+
"@ckeditor/ckeditor5-utils": "45.0.0-alpha.1",
|
|
21
|
+
"ckeditor5": "45.0.0-alpha.1"
|
|
21
22
|
},
|
|
22
23
|
"author": "CKSource (http://cksource.com/)",
|
|
23
24
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module font/fontbackgroundcolor/fontbackgroundcolorui
|
|
7
|
-
*/
|
|
8
5
|
import ColorUI from '../ui/colorui.js';
|
|
9
6
|
import type { Editor } from 'ckeditor5/src/core.js';
|
|
10
7
|
/**
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module font/fontbackgroundcolor/fontbackgroundcolorui
|
|
7
7
|
*/
|
|
8
|
+
import { IconFontBackground } from 'ckeditor5/src/icons.js';
|
|
8
9
|
import ColorUI from '../ui/colorui.js';
|
|
9
10
|
import { FONT_BACKGROUND_COLOR } from '../utils.js';
|
|
10
|
-
import fontBackgroundColorIcon from '../../theme/icons/font-background.svg';
|
|
11
11
|
/**
|
|
12
12
|
* The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.
|
|
13
13
|
*/
|
|
@@ -20,7 +20,7 @@ export default class FontBackgroundColorUI extends ColorUI {
|
|
|
20
20
|
super(editor, {
|
|
21
21
|
commandName: FONT_BACKGROUND_COLOR,
|
|
22
22
|
componentName: FONT_BACKGROUND_COLOR,
|
|
23
|
-
icon:
|
|
23
|
+
icon: IconFontBackground,
|
|
24
24
|
dropdownLabel: t('Font Background Color')
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module font/fontcolor/fontcolorui
|
|
7
|
-
*/
|
|
8
5
|
import ColorUI from '../ui/colorui.js';
|
|
9
6
|
import type { Editor } from 'ckeditor5/src/core.js';
|
|
10
7
|
/**
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module font/fontcolor/fontcolorui
|
|
7
7
|
*/
|
|
8
|
+
import { IconFontColor } from 'ckeditor5/src/icons.js';
|
|
8
9
|
import ColorUI from '../ui/colorui.js';
|
|
9
10
|
import { FONT_COLOR } from '../utils.js';
|
|
10
|
-
import fontColorIcon from '../../theme/icons/font-color.svg';
|
|
11
11
|
/**
|
|
12
12
|
* The font color UI plugin. It introduces the `'fontColor'` dropdown.
|
|
13
13
|
*/
|
|
@@ -20,7 +20,7 @@ export default class FontColorUI extends ColorUI {
|
|
|
20
20
|
super(editor, {
|
|
21
21
|
commandName: FONT_COLOR,
|
|
22
22
|
componentName: FONT_COLOR,
|
|
23
|
-
icon:
|
|
23
|
+
icon: IconFontColor,
|
|
24
24
|
dropdownLabel: t('Font Color')
|
|
25
25
|
});
|
|
26
26
|
}
|
package/src/fontcommand.js
CHANGED
|
@@ -10,6 +10,10 @@ import { Command } from 'ckeditor5/src/core.js';
|
|
|
10
10
|
* The base font command.
|
|
11
11
|
*/
|
|
12
12
|
export default class FontCommand extends Command {
|
|
13
|
+
/**
|
|
14
|
+
* A model attribute on which this command operates.
|
|
15
|
+
*/
|
|
16
|
+
attributeKey;
|
|
13
17
|
/**
|
|
14
18
|
* Creates an instance of the command.
|
|
15
19
|
*
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import { Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { IconFontFamily } from 'ckeditor5/src/icons.js';
|
|
10
11
|
import { ViewModel, createDropdown, addListToDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';
|
|
11
12
|
import { normalizeOptions } from './utils.js';
|
|
12
13
|
import { FONT_FAMILY } from '../utils.js';
|
|
13
|
-
import fontFamilyIcon from '../../theme/icons/font-family.svg';
|
|
14
14
|
/**
|
|
15
15
|
* The font family UI plugin. It introduces the `'fontFamily'` dropdown.
|
|
16
16
|
*/
|
|
@@ -46,7 +46,7 @@ export default class FontFamilyUI extends Plugin {
|
|
|
46
46
|
});
|
|
47
47
|
dropdownView.buttonView.set({
|
|
48
48
|
label: accessibleLabel,
|
|
49
|
-
icon:
|
|
49
|
+
icon: IconFontFamily,
|
|
50
50
|
tooltip: true
|
|
51
51
|
});
|
|
52
52
|
dropdownView.extendTemplate({
|
|
@@ -66,7 +66,7 @@ export default class FontFamilyUI extends Plugin {
|
|
|
66
66
|
const menuView = new MenuBarMenuView(locale);
|
|
67
67
|
menuView.buttonView.set({
|
|
68
68
|
label: accessibleLabel,
|
|
69
|
-
icon:
|
|
69
|
+
icon: IconFontFamily
|
|
70
70
|
});
|
|
71
71
|
menuView.bind('isEnabled').to(command);
|
|
72
72
|
const listView = new MenuBarMenuListView(locale);
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @module font/fontsize/fontsizeui
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { IconFontSize } from 'ckeditor5/src/icons.js';
|
|
9
10
|
import { ViewModel, createDropdown, addListToDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';
|
|
10
11
|
import { Collection } from 'ckeditor5/src/utils.js';
|
|
11
12
|
import { normalizeOptions } from './utils.js';
|
|
12
13
|
import { FONT_SIZE } from '../utils.js';
|
|
13
14
|
import '../../theme/fontsize.css';
|
|
14
|
-
import fontSizeIcon from '../../theme/icons/font-size.svg';
|
|
15
15
|
/**
|
|
16
16
|
* The font size UI plugin. It introduces the `'fontSize'` dropdown.
|
|
17
17
|
*/
|
|
@@ -48,7 +48,7 @@ export default class FontSizeUI extends Plugin {
|
|
|
48
48
|
// Create dropdown model.
|
|
49
49
|
dropdownView.buttonView.set({
|
|
50
50
|
label: accessibleLabel,
|
|
51
|
-
icon:
|
|
51
|
+
icon: IconFontSize,
|
|
52
52
|
tooltip: true
|
|
53
53
|
});
|
|
54
54
|
dropdownView.extendTemplate({
|
|
@@ -70,7 +70,7 @@ export default class FontSizeUI extends Plugin {
|
|
|
70
70
|
const menuView = new MenuBarMenuView(locale);
|
|
71
71
|
menuView.buttonView.set({
|
|
72
72
|
label: accessibleLabel,
|
|
73
|
-
icon:
|
|
73
|
+
icon: IconFontSize
|
|
74
74
|
});
|
|
75
75
|
menuView.bind('isEnabled').to(command);
|
|
76
76
|
const listView = new MenuBarMenuListView(locale);
|
package/src/ui/colorui.js
CHANGED
|
@@ -15,6 +15,27 @@ import { addColorSelectorToDropdown } from '../utils.js';
|
|
|
15
15
|
* a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
|
|
16
16
|
*/
|
|
17
17
|
export default class ColorUI extends Plugin {
|
|
18
|
+
/**
|
|
19
|
+
* The name of the command which will be executed when a color tile is clicked.
|
|
20
|
+
*/
|
|
21
|
+
commandName;
|
|
22
|
+
/**
|
|
23
|
+
* The name of this component in the {@link module:ui/componentfactory~ComponentFactory}.
|
|
24
|
+
* Also the configuration scope name in `editor.config`.
|
|
25
|
+
*/
|
|
26
|
+
componentName;
|
|
27
|
+
/**
|
|
28
|
+
* The SVG icon used by the dropdown.
|
|
29
|
+
*/
|
|
30
|
+
icon;
|
|
31
|
+
/**
|
|
32
|
+
* The label used by the dropdown.
|
|
33
|
+
*/
|
|
34
|
+
dropdownLabel;
|
|
35
|
+
/**
|
|
36
|
+
* The number of columns in the color grid.
|
|
37
|
+
*/
|
|
38
|
+
columns;
|
|
18
39
|
/**
|
|
19
40
|
* Creates a plugin which introduces a dropdown with a pre–configured
|
|
20
41
|
* {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm8.38 9.262H7.62L10 5.506l2.38 5.756zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453h5.824z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M12.4 10.3 10 4.5l-2.4 5.8h4.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.03 3h6.149a.75.75 0 1 1 0 1.5h-5.514L11.03 3zm1.27 3h4.879a.75.75 0 1 1 0 1.5h-4.244L12.3 6zm1.27 3h3.609a.75.75 0 1 1 0 1.5h-2.973L13.57 9zm-2.754 2.5L8.038 4.785 5.261 11.5h5.555zm.62 1.5H4.641l-1.666 4.028H1.312l5.789-14h1.875l5.789 14h-1.663L11.436 13z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.816 11.5 7.038 4.785 4.261 11.5h5.555zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663L10.436 13zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825c0-.042 0-.083.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782c.002.043.003.089.003.135v10.454z"/></svg>
|