@ckeditor/ckeditor5-font 48.8.1-alpha.4 → 49.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.
- package/dist/augmentation.d.ts +56 -56
- package/dist/font.d.ts +32 -32
- package/dist/fontbackgroundcolor/fontbackgroundcolorcommand.d.ts +21 -21
- package/dist/fontbackgroundcolor/fontbackgroundcolorediting.d.ts +25 -25
- package/dist/fontbackgroundcolor/fontbackgroundcolorui.d.ts +15 -15
- package/dist/fontbackgroundcolor.d.ts +29 -29
- package/dist/fontcolor/fontcolorcommand.d.ts +20 -20
- package/dist/fontcolor/fontcolorediting.d.ts +25 -25
- package/dist/fontcolor/fontcolorui.d.ts +15 -15
- package/dist/fontcolor.d.ts +28 -28
- package/dist/fontcommand.d.ts +43 -43
- package/dist/fontconfig.d.ts +289 -356
- package/dist/fontfamily/fontfamilycommand.d.ts +20 -20
- package/dist/fontfamily/fontfamilyediting.d.ts +38 -38
- package/dist/fontfamily/fontfamilyui.d.ts +29 -29
- package/dist/fontfamily/utils.d.ts +16 -16
- package/dist/fontfamily.d.ts +28 -28
- package/dist/fontsize/fontsizecommand.d.ts +20 -20
- package/dist/fontsize/fontsizeediting.d.ts +43 -43
- package/dist/fontsize/fontsizeui.d.ts +29 -30
- package/dist/fontsize/utils.d.ts +10 -10
- package/dist/fontsize.d.ts +36 -36
- package/dist/index-content.css +20 -16
- package/dist/index-content.css.map +1 -0
- package/dist/index-editor.css +3 -6
- package/dist/index-editor.css.map +1 -0
- package/dist/index.css +14 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +31 -29
- package/dist/index.js +1465 -1568
- package/dist/index.js.map +1 -1
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +5 -3
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +5 -3
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +5 -3
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +5 -3
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +5 -3
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +5 -3
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +5 -3
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +5 -3
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +5 -3
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +5 -3
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +5 -3
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +5 -3
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +5 -3
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +5 -3
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +5 -3
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +5 -3
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +5 -3
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +5 -3
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +5 -3
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +5 -3
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +5 -3
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +5 -3
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +5 -3
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +5 -3
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +5 -3
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +5 -3
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +5 -3
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +5 -3
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +5 -3
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +5 -3
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +5 -3
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +5 -3
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +5 -3
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +5 -3
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +5 -3
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +5 -3
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +5 -3
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +5 -3
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +5 -3
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +5 -3
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +5 -3
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +5 -3
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +5 -3
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +5 -3
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +5 -3
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +5 -3
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +5 -3
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +5 -3
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +5 -3
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +5 -3
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +5 -3
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +5 -3
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +5 -3
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +5 -3
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +5 -3
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +5 -3
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +5 -3
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +5 -3
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +5 -3
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +5 -3
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +5 -3
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +5 -3
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +5 -3
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +5 -3
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +5 -3
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +5 -3
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +5 -3
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +5 -3
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +5 -3
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +5 -3
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +5 -3
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +5 -3
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +5 -3
- package/dist/ui/colorui.d.ts +59 -59
- package/dist/utils.d.ts +69 -69
- package/package.json +6 -6
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'uk' ]:
|
|
7
|
+
const { [ 'uk' ]: translations } = {"uk":{"dictionary":{"Font Size":"Розмір шрифту","Tiny":"Крихітний","Small":"Маленький","Big":"Великий","Huge":"Величезний","Font Family":"Сімейство шрифтів","Default":"За замовчуванням","Font Color":"Колір шрифту","Font Background Color":"Колір тла шрифту","Document colors":"Кольори документу"}}};
|
|
8
8
|
e[ 'uk' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
-
e[ 'uk' ].dictionary = Object.assign( e[ 'uk' ].dictionary, dictionary );
|
|
10
|
-
|
|
9
|
+
e[ 'uk' ].dictionary = Object.assign( e[ 'uk' ].dictionary, translations.dictionary );
|
|
10
|
+
if ( translations.getPluralForm ) {
|
|
11
|
+
e[ 'uk' ].getPluralForm = translations.getPluralForm;
|
|
12
|
+
}
|
|
11
13
|
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/ur.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, 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
|
-
export default {"ur":{"dictionary":{"Font Size":"فانٹ کا حجم","Tiny":"ننھا","Small":"چھوٹا","Big":"بڑا","Huge":"جسيم","Font Family":"فانٹ خاندان","Default":"طے شدہ","Font Color":"فانٹ کا رنگ","Font Background Color":"فانٹ کے پس منظر کا رنگ","Document colors":"دستاویز کے رنگ"}
|
|
5
|
+
export default {"ur":{"dictionary":{"Font Size":"فانٹ کا حجم","Tiny":"ننھا","Small":"چھوٹا","Big":"بڑا","Huge":"جسيم","Font Family":"فانٹ خاندان","Default":"طے شدہ","Font Color":"فانٹ کا رنگ","Font Background Color":"فانٹ کے پس منظر کا رنگ","Document colors":"دستاویز کے رنگ"}}}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'ur' ]:
|
|
7
|
+
const { [ 'ur' ]: translations } = {"ur":{"dictionary":{"Font Size":"فانٹ کا حجم","Tiny":"ننھا","Small":"چھوٹا","Big":"بڑا","Huge":"جسيم","Font Family":"فانٹ خاندان","Default":"طے شدہ","Font Color":"فانٹ کا رنگ","Font Background Color":"فانٹ کے پس منظر کا رنگ","Document colors":"دستاویز کے رنگ"}}};
|
|
8
8
|
e[ 'ur' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
-
e[ 'ur' ].dictionary = Object.assign( e[ 'ur' ].dictionary, dictionary );
|
|
10
|
-
|
|
9
|
+
e[ 'ur' ].dictionary = Object.assign( e[ 'ur' ].dictionary, translations.dictionary );
|
|
10
|
+
if ( translations.getPluralForm ) {
|
|
11
|
+
e[ 'ur' ].getPluralForm = translations.getPluralForm;
|
|
12
|
+
}
|
|
11
13
|
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/uz.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, 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
|
-
export default {"uz":{"dictionary":{"Font Size":"Shrift hajmi","Tiny":"Juda kichik","Small":"Kichik","Big":"Katta","Huge":"Juda katta","Font Family":"Shriftlar oilasi","Default":"Standart","Font Color":"Shrift rangi","Font Background Color":"Fon rangi","Document colors":"Sahifa rangi"}
|
|
5
|
+
export default {"uz":{"dictionary":{"Font Size":"Shrift hajmi","Tiny":"Juda kichik","Small":"Kichik","Big":"Katta","Huge":"Juda katta","Font Family":"Shriftlar oilasi","Default":"Standart","Font Color":"Shrift rangi","Font Background Color":"Fon rangi","Document colors":"Sahifa rangi"}}}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'uz' ]:
|
|
7
|
+
const { [ 'uz' ]: translations } = {"uz":{"dictionary":{"Font Size":"Shrift hajmi","Tiny":"Juda kichik","Small":"Kichik","Big":"Katta","Huge":"Juda katta","Font Family":"Shriftlar oilasi","Default":"Standart","Font Color":"Shrift rangi","Font Background Color":"Fon rangi","Document colors":"Sahifa rangi"}}};
|
|
8
8
|
e[ 'uz' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
-
e[ 'uz' ].dictionary = Object.assign( e[ 'uz' ].dictionary, dictionary );
|
|
10
|
-
|
|
9
|
+
e[ 'uz' ].dictionary = Object.assign( e[ 'uz' ].dictionary, translations.dictionary );
|
|
10
|
+
if ( translations.getPluralForm ) {
|
|
11
|
+
e[ 'uz' ].getPluralForm = translations.getPluralForm;
|
|
12
|
+
}
|
|
11
13
|
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/vi.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, 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
|
-
export default {"vi":{"dictionary":{"Font Size":"Cỡ chữ","Tiny":"Bé","Small":"Nhỏ","Big":"Lớn","Huge":"Khổng lồ","Font Family":"Họ chữ","Default":"Mặc định","Font Color":"Màu chữ","Font Background Color":"Màu nền chữ","Document colors":"Màu văn bản"}
|
|
5
|
+
export default {"vi":{"dictionary":{"Font Size":"Cỡ chữ","Tiny":"Bé","Small":"Nhỏ","Big":"Lớn","Huge":"Khổng lồ","Font Family":"Họ chữ","Default":"Mặc định","Font Color":"Màu chữ","Font Background Color":"Màu nền chữ","Document colors":"Màu văn bản"}}}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'vi' ]:
|
|
7
|
+
const { [ 'vi' ]: translations } = {"vi":{"dictionary":{"Font Size":"Cỡ chữ","Tiny":"Bé","Small":"Nhỏ","Big":"Lớn","Huge":"Khổng lồ","Font Family":"Họ chữ","Default":"Mặc định","Font Color":"Màu chữ","Font Background Color":"Màu nền chữ","Document colors":"Màu văn bản"}}};
|
|
8
8
|
e[ 'vi' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
-
e[ 'vi' ].dictionary = Object.assign( e[ 'vi' ].dictionary, dictionary );
|
|
10
|
-
|
|
9
|
+
e[ 'vi' ].dictionary = Object.assign( e[ 'vi' ].dictionary, translations.dictionary );
|
|
10
|
+
if ( translations.getPluralForm ) {
|
|
11
|
+
e[ 'vi' ].getPluralForm = translations.getPluralForm;
|
|
12
|
+
}
|
|
11
13
|
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, 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
|
-
export default {"zh-cn":{"dictionary":{"Font Size":"字体大小","Tiny":"极小","Small":"小","Big":"大","Huge":"极大","Font Family":"字体","Default":"默认","Font Color":"字体颜色","Font Background Color":"字体背景色","Document colors":"文档中的颜色"}
|
|
5
|
+
export default {"zh-cn":{"dictionary":{"Font Size":"字体大小","Tiny":"极小","Small":"小","Big":"大","Huge":"极大","Font Family":"字体","Default":"默认","Font Color":"字体颜色","Font Background Color":"字体背景色","Document colors":"文档中的颜色"}}}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'zh-cn' ]:
|
|
7
|
+
const { [ 'zh-cn' ]: translations } = {"zh-cn":{"dictionary":{"Font Size":"字体大小","Tiny":"极小","Small":"小","Big":"大","Huge":"极大","Font Family":"字体","Default":"默认","Font Color":"字体颜色","Font Background Color":"字体背景色","Document colors":"文档中的颜色"}}};
|
|
8
8
|
e[ 'zh-cn' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
-
e[ 'zh-cn' ].dictionary = Object.assign( e[ 'zh-cn' ].dictionary, dictionary );
|
|
10
|
-
|
|
9
|
+
e[ 'zh-cn' ].dictionary = Object.assign( e[ 'zh-cn' ].dictionary, translations.dictionary );
|
|
10
|
+
if ( translations.getPluralForm ) {
|
|
11
|
+
e[ 'zh-cn' ].getPluralForm = translations.getPluralForm;
|
|
12
|
+
}
|
|
11
13
|
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/translations/zh.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, 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
|
-
export default {"zh":{"dictionary":{"Font Size":"字體大小","Tiny":"特小","Small":"小","Big":"大","Huge":"特大","Font Family":"字型","Default":"預設","Font Color":"字體顏色","Font Background Color":"前景顏色","Document colors":"文件顏色"}
|
|
5
|
+
export default {"zh":{"dictionary":{"Font Size":"字體大小","Tiny":"特小","Small":"小","Big":"大","Huge":"特大","Font Family":"字型","Default":"預設","Font Color":"字體顏色","Font Background Color":"前景顏色","Document colors":"文件顏色"}}}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
( e => {
|
|
7
|
-
const { [ 'zh' ]:
|
|
7
|
+
const { [ 'zh' ]: translations } = {"zh":{"dictionary":{"Font Size":"字體大小","Tiny":"特小","Small":"小","Big":"大","Huge":"特大","Font Family":"字型","Default":"預設","Font Color":"字體顏色","Font Background Color":"前景顏色","Document colors":"文件顏色"}}};
|
|
8
8
|
e[ 'zh' ] ||= { dictionary: {}, getPluralForm: null };
|
|
9
|
-
e[ 'zh' ].dictionary = Object.assign( e[ 'zh' ].dictionary, dictionary );
|
|
10
|
-
|
|
9
|
+
e[ 'zh' ].dictionary = Object.assign( e[ 'zh' ].dictionary, translations.dictionary );
|
|
10
|
+
if ( translations.getPluralForm ) {
|
|
11
|
+
e[ 'zh' ].getPluralForm = translations.getPluralForm;
|
|
12
|
+
}
|
|
11
13
|
} )( window.CKEDITOR_TRANSLATIONS ||= {} );
|
package/dist/ui/colorui.d.ts
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin, type Editor } from
|
|
9
|
-
import { type FONT_BACKGROUND_COLOR, type FONT_COLOR } from
|
|
6
|
+
* @module font/ui/colorui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { type FONT_BACKGROUND_COLOR, type FONT_COLOR } from "../utils.js";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
* The color UI plugin which isolates the common logic responsible for displaying dropdowns with color grids.
|
|
12
|
+
*
|
|
13
|
+
* It is used to create the `'fontBackgroundColor'` and `'fontColor'` dropdowns, each hosting
|
|
14
|
+
* a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
|
|
15
|
+
*/
|
|
16
16
|
export declare class FontColorUIBase extends Plugin {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The name of the command which will be executed when a color tile is clicked.
|
|
19
|
+
*/
|
|
20
|
+
commandName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;
|
|
21
|
+
/**
|
|
22
|
+
* The name of this component in the {@link module:ui/componentfactory~ComponentFactory}.
|
|
23
|
+
* Also the configuration scope name in `editor.config`.
|
|
24
|
+
*/
|
|
25
|
+
componentName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;
|
|
26
|
+
/**
|
|
27
|
+
* The SVG icon used by the dropdown.
|
|
28
|
+
*/
|
|
29
|
+
icon: string;
|
|
30
|
+
/**
|
|
31
|
+
* The label used by the dropdown.
|
|
32
|
+
*/
|
|
33
|
+
dropdownLabel: string;
|
|
34
|
+
/**
|
|
35
|
+
* The number of columns in the color grid.
|
|
36
|
+
*/
|
|
37
|
+
columns: number;
|
|
38
|
+
/**
|
|
39
|
+
* Keeps all changes in color picker in one batch while dropdown is open.
|
|
40
|
+
*/
|
|
41
|
+
private _undoStepBatch;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a plugin which introduces a dropdown with a pre–configured
|
|
44
|
+
* {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
|
|
45
|
+
*
|
|
46
|
+
* @param editor An editor instance.
|
|
47
|
+
* @param config The configuration object.
|
|
48
|
+
* @param config.commandName The name of the command which will be executed when a color tile is clicked.
|
|
49
|
+
* @param config.componentName The name of the dropdown in the {@link module:ui/componentfactory~ComponentFactory}
|
|
50
|
+
* and the configuration scope name in `editor.config`.
|
|
51
|
+
* @param config.icon The SVG icon used by the dropdown.
|
|
52
|
+
* @param config.dropdownLabel The label used by the dropdown.
|
|
53
|
+
*/
|
|
54
|
+
constructor(editor: Editor, { commandName, componentName, icon, dropdownLabel }: {
|
|
55
|
+
commandName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;
|
|
56
|
+
componentName: typeof FONT_BACKGROUND_COLOR | typeof FONT_COLOR;
|
|
57
|
+
icon: string;
|
|
58
|
+
dropdownLabel: string;
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* @inheritDoc
|
|
62
|
+
*/
|
|
63
|
+
init(): void;
|
|
64
64
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, 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
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { FontFamilyOption, FontSizeOption } from
|
|
9
|
-
import { ColorSelectorView, type ColorDefinition, type ColorPickerViewConfig, type DropdownView } from
|
|
10
|
-
import type { ArrayOrItem } from
|
|
11
|
-
import type { ViewAttributeElement, ViewElement, MatcherPattern, ViewElementDefinition, DowncastConversionApi } from
|
|
6
|
+
* @module font/utils
|
|
7
|
+
*/
|
|
8
|
+
import type { FontFamilyOption, FontSizeOption } from "./fontconfig.js";
|
|
9
|
+
import { ColorSelectorView, type ColorDefinition, type ColorPickerViewConfig, type DropdownView } from "@ckeditor/ckeditor5-ui";
|
|
10
|
+
import type { ArrayOrItem } from "@ckeditor/ckeditor5-utils";
|
|
11
|
+
import type { ViewAttributeElement, ViewElement, MatcherPattern, ViewElementDefinition, DowncastConversionApi } from "@ckeditor/ckeditor5-engine";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
* The name of the font size plugin.
|
|
14
|
+
*/
|
|
15
15
|
export declare const FONT_SIZE = "fontSize";
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* The name of the font family plugin.
|
|
18
|
+
*/
|
|
19
19
|
export declare const FONT_FAMILY = "fontFamily";
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* The name of the font color plugin.
|
|
22
|
+
*/
|
|
23
23
|
export declare const FONT_COLOR = "fontColor";
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* The name of the font background color plugin.
|
|
26
|
+
*/
|
|
27
27
|
export declare const FONT_BACKGROUND_COLOR = "fontBackgroundColor";
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
* Builds a proper converter definition out of input data.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
33
|
export declare function buildDefinition(modelAttributeKey: string, options: Array<FontFamilyOption> | Array<FontSizeOption>): FontConverterDefinition;
|
|
34
34
|
/**
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
37
|
export type FontConverterDefinition = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
model: {
|
|
39
|
+
key: string;
|
|
40
|
+
values: Array<string>;
|
|
41
|
+
};
|
|
42
|
+
view: Record<string, ViewElementDefinition>;
|
|
43
|
+
upcastAlso: Record<string, ArrayOrItem<MatcherPattern>>;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
* A {@link module:font/fontcolor~FontColor font color} and
|
|
47
|
+
* {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper
|
|
48
|
+
* responsible for upcasting data to the model.
|
|
49
|
+
*
|
|
50
|
+
* **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
54
|
export declare function renderUpcastAttribute(styleAttr: string): (viewElement: ViewElement) => string;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
* A {@link module:font/fontcolor~FontColor font color} and
|
|
57
|
+
* {@link module:font/fontbackgroundcolor~FontBackgroundColor font background color} helper
|
|
58
|
+
* responsible for downcasting a color attribute to a `<span>` element.
|
|
59
|
+
*
|
|
60
|
+
* **Note**: The `styleAttr` parameter should be either `'color'` or `'background-color'`.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
64
|
export declare function renderDowncastElement(styleAttr: string): (modelAttributeValue: string, { writer }: DowncastConversionApi) => ViewAttributeElement;
|
|
65
65
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
* A helper that adds {@link module:ui/colorselector/colorselectorview~ColorSelectorView} to the color dropdown with proper initial values.
|
|
67
|
+
*
|
|
68
|
+
* @param options Configuration options
|
|
69
|
+
* @param options.dropdownView The dropdown view to which a {@link module:ui/colorselector/colorselectorview~ColorSelectorView}
|
|
70
|
+
* will be added.
|
|
71
|
+
* @param options.colors An array with definitions representing colors to be displayed in the color selector.
|
|
72
|
+
* @param options.columns The number of columns in the color grid.
|
|
73
|
+
* @param options.removeButtonLabel The label for the button responsible for removing the color.
|
|
74
|
+
* @param options.colorPickerLabel The label for the color picker button.
|
|
75
|
+
* @param options.documentColorsLabel The label for the section with document colors.
|
|
76
|
+
* @param options.documentColorsCount The number of document colors inside the dropdown.
|
|
77
|
+
* @param options.colorPickerViewConfig Configuration of the color picker view.
|
|
78
|
+
* @returns The new color selector view.
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
81
|
export declare function addColorSelectorToDropdown({ dropdownView, colors, columns, removeButtonLabel, colorPickerLabel, documentColorsLabel, documentColorsCount, colorPickerViewConfig }: {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
dropdownView: FontColorSelectorDropdownView;
|
|
83
|
+
colors: Array<ColorDefinition>;
|
|
84
|
+
columns: number;
|
|
85
|
+
removeButtonLabel: string;
|
|
86
|
+
colorPickerLabel: string;
|
|
87
|
+
documentColorsLabel?: string;
|
|
88
|
+
documentColorsCount?: number;
|
|
89
|
+
colorPickerViewConfig: ColorPickerViewConfig | false;
|
|
90
90
|
}): ColorSelectorView;
|
|
91
91
|
export type FontColorSelectorDropdownView = DropdownView & {
|
|
92
|
-
|
|
92
|
+
colorSelectorView?: ColorSelectorView;
|
|
93
93
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-font",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "49.0.0-alpha.0",
|
|
4
4
|
"description": "Font feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ckeditor/ckeditor5-core": "
|
|
30
|
-
"@ckeditor/ckeditor5-engine": "
|
|
31
|
-
"@ckeditor/ckeditor5-icons": "
|
|
32
|
-
"@ckeditor/ckeditor5-ui": "
|
|
33
|
-
"@ckeditor/ckeditor5-utils": "
|
|
29
|
+
"@ckeditor/ckeditor5-core": "49.0.0-alpha.0",
|
|
30
|
+
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.0",
|
|
31
|
+
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.0",
|
|
32
|
+
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.0",
|
|
33
|
+
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.0"
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
36
|
"dist",
|