@ckeditor/ckeditor5-font 44.1.0 → 44.2.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/LICENSE.md +1 -1
- package/build/font.js +1 -1
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/gu.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/kk.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/oc.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sl.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/ti.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +29 -7
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/font.d.ts +1 -1
- package/src/font.js +1 -1
- package/src/fontbackgroundcolor/fontbackgroundcolorcommand.d.ts +1 -1
- package/src/fontbackgroundcolor/fontbackgroundcolorcommand.js +1 -1
- package/src/fontbackgroundcolor/fontbackgroundcolorediting.d.ts +1 -1
- package/src/fontbackgroundcolor/fontbackgroundcolorediting.js +1 -1
- package/src/fontbackgroundcolor/fontbackgroundcolorui.d.ts +1 -1
- package/src/fontbackgroundcolor/fontbackgroundcolorui.js +1 -1
- package/src/fontbackgroundcolor.d.ts +1 -1
- package/src/fontbackgroundcolor.js +1 -1
- package/src/fontcolor/fontcolorcommand.d.ts +1 -1
- package/src/fontcolor/fontcolorcommand.js +1 -1
- package/src/fontcolor/fontcolorediting.d.ts +1 -1
- package/src/fontcolor/fontcolorediting.js +1 -1
- package/src/fontcolor/fontcolorui.d.ts +1 -1
- package/src/fontcolor/fontcolorui.js +1 -1
- package/src/fontcolor.d.ts +1 -1
- package/src/fontcolor.js +1 -1
- package/src/fontcommand.d.ts +1 -1
- package/src/fontcommand.js +1 -1
- package/src/fontconfig.d.ts +1 -1
- package/src/fontconfig.js +1 -1
- package/src/fontfamily/fontfamilycommand.d.ts +1 -1
- package/src/fontfamily/fontfamilycommand.js +1 -1
- package/src/fontfamily/fontfamilyediting.d.ts +1 -1
- package/src/fontfamily/fontfamilyediting.js +1 -1
- package/src/fontfamily/fontfamilyui.d.ts +1 -1
- package/src/fontfamily/fontfamilyui.js +1 -1
- package/src/fontfamily/utils.d.ts +1 -1
- package/src/fontfamily/utils.js +1 -1
- package/src/fontfamily.d.ts +1 -1
- package/src/fontfamily.js +1 -1
- package/src/fontsize/fontsizecommand.d.ts +1 -1
- package/src/fontsize/fontsizecommand.js +1 -1
- package/src/fontsize/fontsizeediting.d.ts +1 -1
- package/src/fontsize/fontsizeediting.js +1 -1
- package/src/fontsize/fontsizeui.d.ts +1 -1
- package/src/fontsize/fontsizeui.js +1 -1
- package/src/fontsize/utils.d.ts +1 -1
- package/src/fontsize/utils.js +1 -1
- package/src/fontsize.d.ts +1 -1
- package/src/fontsize.js +1 -1
- package/src/index.d.ts +2 -2
- package/src/index.js +1 -1
- package/src/ui/colorui.d.ts +1 -1
- package/src/ui/colorui.js +1 -1
- package/src/utils.d.ts +1 -1
- package/src/utils.js +1 -1
- package/theme/fontsize.css +1 -1
- package/dist/augmentation.d.ts +0 -62
- package/dist/font.d.ts +0 -41
- package/dist/fontbackgroundcolor/fontbackgroundcolorcommand.d.ts +0 -30
- package/dist/fontbackgroundcolor/fontbackgroundcolorediting.d.ts +0 -34
- package/dist/fontbackgroundcolor/fontbackgroundcolorui.d.ts +0 -26
- package/dist/fontbackgroundcolor.d.ts +0 -38
- package/dist/fontcolor/fontcolorcommand.d.ts +0 -29
- package/dist/fontcolor/fontcolorediting.d.ts +0 -34
- package/dist/fontcolor/fontcolorui.d.ts +0 -26
- package/dist/fontcolor.d.ts +0 -37
- package/dist/fontcommand.d.ts +0 -52
- package/dist/fontconfig.d.ts +0 -377
- package/dist/fontfamily/fontfamilycommand.d.ts +0 -29
- package/dist/fontfamily/fontfamilyediting.d.ts +0 -47
- package/dist/fontfamily/fontfamilyui.d.ts +0 -38
- package/dist/fontfamily/utils.d.ts +0 -19
- package/dist/fontfamily.d.ts +0 -37
- package/dist/fontsize/fontsizecommand.d.ts +0 -29
- package/dist/fontsize/fontsizeediting.d.ts +0 -52
- package/dist/fontsize/fontsizeui.d.ts +0 -39
- package/dist/fontsize/utils.d.ts +0 -16
- package/dist/fontsize.d.ts +0 -45
- package/dist/index.d.ts +0 -31
- package/dist/ui/colorui.d.ts +0 -67
- package/dist/utils.d.ts +0 -84
package/dist/fontconfig.d.ts
DELETED
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontconfig
|
|
11
|
-
*/
|
|
12
|
-
import type { ColorOption, ColorPickerConfig } from 'ckeditor5/src/ui.js';
|
|
13
|
-
import type { MatcherPattern, ViewElementDefinition } from 'ckeditor5/src/engine.js';
|
|
14
|
-
/**
|
|
15
|
-
* The configuration of the font color and font background color features.
|
|
16
|
-
* This option is used by the {@link module:font/fontcolor/fontcolorediting~FontColorEditing} and
|
|
17
|
-
* {@link module:font/fontbackgroundcolor/fontbackgroundcolorediting~FontBackgroundColorEditing} features.
|
|
18
|
-
*
|
|
19
|
-
* ```ts
|
|
20
|
-
* ClassicEditor
|
|
21
|
-
* .create( {
|
|
22
|
-
* fontColor: ... // Font color feature configuration.
|
|
23
|
-
* fontBackgroundColor: ... // Font background color feature configuration.
|
|
24
|
-
* } )
|
|
25
|
-
* .then( ... )
|
|
26
|
-
* .catch( ... );
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
30
|
-
*/
|
|
31
|
-
export interface FontColorConfig {
|
|
32
|
-
/**
|
|
33
|
-
* Available font colors defined as an array of strings or objects.
|
|
34
|
-
*
|
|
35
|
-
* The default value registers the following colors:
|
|
36
|
-
*
|
|
37
|
-
* ```ts
|
|
38
|
-
* const fontColorConfig = {
|
|
39
|
-
* colors: [
|
|
40
|
-
* {
|
|
41
|
-
* color: 'hsl(0, 0%, 0%)',
|
|
42
|
-
* label: 'Black'
|
|
43
|
-
* },
|
|
44
|
-
* {
|
|
45
|
-
* color: 'hsl(0, 0%, 30%)',
|
|
46
|
-
* label: 'Dim grey'
|
|
47
|
-
* },
|
|
48
|
-
* {
|
|
49
|
-
* color: 'hsl(0, 0%, 60%)',
|
|
50
|
-
* label: 'Grey'
|
|
51
|
-
* },
|
|
52
|
-
* {
|
|
53
|
-
* color: 'hsl(0, 0%, 90%)',
|
|
54
|
-
* label: 'Light grey'
|
|
55
|
-
* },
|
|
56
|
-
* {
|
|
57
|
-
* color: 'hsl(0, 0%, 100%)',
|
|
58
|
-
* label: 'White',
|
|
59
|
-
* hasBorder: true
|
|
60
|
-
* },
|
|
61
|
-
* {
|
|
62
|
-
* color: 'hsl(0, 75%, 60%)',
|
|
63
|
-
* label: 'Red'
|
|
64
|
-
* },
|
|
65
|
-
* {
|
|
66
|
-
* color: 'hsl(30, 75%, 60%)',
|
|
67
|
-
* label: 'Orange'
|
|
68
|
-
* },
|
|
69
|
-
* {
|
|
70
|
-
* color: 'hsl(60, 75%, 60%)',
|
|
71
|
-
* label: 'Yellow'
|
|
72
|
-
* },
|
|
73
|
-
* {
|
|
74
|
-
* color: 'hsl(90, 75%, 60%)',
|
|
75
|
-
* label: 'Light green'
|
|
76
|
-
* },
|
|
77
|
-
* {
|
|
78
|
-
* color: 'hsl(120, 75%, 60%)',
|
|
79
|
-
* label: 'Green'
|
|
80
|
-
* },
|
|
81
|
-
* {
|
|
82
|
-
* color: 'hsl(150, 75%, 60%)',
|
|
83
|
-
* label: 'Aquamarine'
|
|
84
|
-
* },
|
|
85
|
-
* {
|
|
86
|
-
* color: 'hsl(180, 75%, 60%)',
|
|
87
|
-
* label: 'Turquoise'
|
|
88
|
-
* },
|
|
89
|
-
* {
|
|
90
|
-
* color: 'hsl(210, 75%, 60%)',
|
|
91
|
-
* label: 'Light blue'
|
|
92
|
-
* },
|
|
93
|
-
* {
|
|
94
|
-
* color: 'hsl(240, 75%, 60%)',
|
|
95
|
-
* label: 'Blue'
|
|
96
|
-
* },
|
|
97
|
-
* {
|
|
98
|
-
* color: 'hsl(270, 75%, 60%)',
|
|
99
|
-
* label: 'Purple'
|
|
100
|
-
* }
|
|
101
|
-
* ]
|
|
102
|
-
* };
|
|
103
|
-
* ```
|
|
104
|
-
*
|
|
105
|
-
* **Note**: The colors are displayed in the `'fontColor'` dropdown.
|
|
106
|
-
*/
|
|
107
|
-
colors?: Array<string | ColorOption>;
|
|
108
|
-
/**
|
|
109
|
-
* Determines the maximum number of available document colors.
|
|
110
|
-
* Setting it to `0` will disable the document colors feature.
|
|
111
|
-
*
|
|
112
|
-
* By default it equals to the {@link module:font/fontconfig~FontColorConfig#columns} value.
|
|
113
|
-
*
|
|
114
|
-
* Examples:
|
|
115
|
-
*
|
|
116
|
-
* ```ts
|
|
117
|
-
* // 1) Neither document colors nor columns are defined in the configuration.
|
|
118
|
-
* // Document colors will equal 5,
|
|
119
|
-
* // because the value will be inherited from columns,
|
|
120
|
-
* // which has a predefined value of 5.
|
|
121
|
-
* const fontColorConfig = {}
|
|
122
|
-
*
|
|
123
|
-
* // 2) Document colors will equal 8, because the value will be inherited from columns.
|
|
124
|
-
* const fontColorConfig = {
|
|
125
|
-
* columns: 8
|
|
126
|
-
* }
|
|
127
|
-
*
|
|
128
|
-
* // 3) Document colors will equal 24, because it has its own value defined.
|
|
129
|
-
* const fontColorConfig = {
|
|
130
|
-
* columns: 8,
|
|
131
|
-
* documentColors: 24
|
|
132
|
-
* }
|
|
133
|
-
*
|
|
134
|
-
* // 4) The document colors feature will be disabled.
|
|
135
|
-
* const fontColorConfig = {
|
|
136
|
-
* columns: 8,
|
|
137
|
-
* documentColors: 0
|
|
138
|
-
* }
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
documentColors?: number;
|
|
142
|
-
/**
|
|
143
|
-
* Represents the number of columns in the font color dropdown.
|
|
144
|
-
*
|
|
145
|
-
* The default value is:
|
|
146
|
-
*
|
|
147
|
-
* ```ts
|
|
148
|
-
* const fontColorConfig = {
|
|
149
|
-
* columns: 5
|
|
150
|
-
* }
|
|
151
|
-
* ```
|
|
152
|
-
*/
|
|
153
|
-
columns?: number;
|
|
154
|
-
/**
|
|
155
|
-
* Configuration of the color picker feature.
|
|
156
|
-
*
|
|
157
|
-
* If set to `false` the picker will not appear.
|
|
158
|
-
*/
|
|
159
|
-
colorPicker?: false | ColorPickerConfig;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* The configuration of the font family feature.
|
|
163
|
-
* This option is used by the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} feature.
|
|
164
|
-
*
|
|
165
|
-
* ```ts
|
|
166
|
-
* ClassicEditor
|
|
167
|
-
* .create( {
|
|
168
|
-
* fontFamily: ... // Font family feature configuration.
|
|
169
|
-
* } )
|
|
170
|
-
* .then( ... )
|
|
171
|
-
* .catch( ... );
|
|
172
|
-
* ```
|
|
173
|
-
*
|
|
174
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
175
|
-
*/
|
|
176
|
-
export interface FontFamilyConfig {
|
|
177
|
-
/**
|
|
178
|
-
* Available font family options defined as an array of strings. The default value is:
|
|
179
|
-
*
|
|
180
|
-
* ```ts
|
|
181
|
-
* const fontFamilyConfig = {
|
|
182
|
-
* options: [
|
|
183
|
-
* 'default',
|
|
184
|
-
* 'Arial, Helvetica, sans-serif',
|
|
185
|
-
* 'Courier New, Courier, monospace',
|
|
186
|
-
* 'Georgia, serif',
|
|
187
|
-
* 'Lucida Sans Unicode, Lucida Grande, sans-serif',
|
|
188
|
-
* 'Tahoma, Geneva, sans-serif',
|
|
189
|
-
* 'Times New Roman, Times, serif',
|
|
190
|
-
* 'Trebuchet MS, Helvetica, sans-serif',
|
|
191
|
-
* 'Verdana, Geneva, sans-serif'
|
|
192
|
-
* ]
|
|
193
|
-
* };
|
|
194
|
-
* ```
|
|
195
|
-
*
|
|
196
|
-
* which configures 8 font family options. Each option consists of one or more comma–separated font family names. The first font name is
|
|
197
|
-
* used as the dropdown item description in the UI.
|
|
198
|
-
*
|
|
199
|
-
* **Note:** The family names that consist of spaces should not have quotes (as opposed to the CSS standard). The necessary quotes
|
|
200
|
-
* will be added automatically in the view. For example, the `"Lucida Sans Unicode"` will render as follows:
|
|
201
|
-
*
|
|
202
|
-
* ```html
|
|
203
|
-
* <span style="font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif">...</span>
|
|
204
|
-
* ```
|
|
205
|
-
*
|
|
206
|
-
* The "default" option removes the `fontFamily` attribute from the selection. In such case, the text will
|
|
207
|
-
* be rendered in the view using the default font family defined in the styles of the web page.
|
|
208
|
-
*
|
|
209
|
-
* Font family can be applied using the command API. To do that, use the `fontFamily` command and pass the desired family as a `value`.
|
|
210
|
-
* For example, the following code will apply the `fontFamily` attribute with the `'Arial'` `value` to the current selection:
|
|
211
|
-
*
|
|
212
|
-
* ```ts
|
|
213
|
-
* editor.execute( 'fontFamily', { value: 'Arial' } );
|
|
214
|
-
* ```
|
|
215
|
-
*
|
|
216
|
-
* Executing the `'fontFamily'` command without any value will remove the `fontFamily` attribute from the current selection.
|
|
217
|
-
*/
|
|
218
|
-
options?: Array<string | FontFamilyOption>;
|
|
219
|
-
/**
|
|
220
|
-
* By default the plugin removes any `font-family` value that does not match the plugin's configuration.
|
|
221
|
-
* It means that if you paste content with font families that the editor does not understand, the `font-family` attribute
|
|
222
|
-
* will be removed and the content will be displayed with the default font.
|
|
223
|
-
*
|
|
224
|
-
* You can preserve pasted font family values by switching the `supportAllValues` option to `true`:
|
|
225
|
-
*
|
|
226
|
-
* ```ts
|
|
227
|
-
* const fontFamilyConfig = {
|
|
228
|
-
* supportAllValues: true
|
|
229
|
-
* };
|
|
230
|
-
* ```
|
|
231
|
-
*
|
|
232
|
-
* With this configuration font families not specified in the editor configuration will not be removed when pasting the content.
|
|
233
|
-
*/
|
|
234
|
-
supportAllValues?: boolean;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* The font family option descriptor.
|
|
238
|
-
*/
|
|
239
|
-
export interface FontFamilyOption {
|
|
240
|
-
/**
|
|
241
|
-
* The user-readable title of the option.
|
|
242
|
-
*/
|
|
243
|
-
title: string;
|
|
244
|
-
/**
|
|
245
|
-
* The attribute's unique value in the model.
|
|
246
|
-
*/
|
|
247
|
-
model?: string;
|
|
248
|
-
/**
|
|
249
|
-
* View element configuration.
|
|
250
|
-
*/
|
|
251
|
-
view?: ViewElementDefinition;
|
|
252
|
-
/**
|
|
253
|
-
* An array with all matched elements that the view-to-model conversion should also accept.
|
|
254
|
-
*/
|
|
255
|
-
upcastAlso?: Array<MatcherPattern>;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* The configuration of the font size feature.
|
|
259
|
-
* This option is used by the {@link module:font/fontsize/fontsizeediting~FontSizeEditing} feature.
|
|
260
|
-
*
|
|
261
|
-
* ```ts
|
|
262
|
-
* ClassicEditor
|
|
263
|
-
* .create( {
|
|
264
|
-
* fontSize: ... // Font size feature configuration.
|
|
265
|
-
* } )
|
|
266
|
-
* .then( ... )
|
|
267
|
-
* .catch( ... );
|
|
268
|
-
* ```
|
|
269
|
-
*
|
|
270
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
271
|
-
*/
|
|
272
|
-
export interface FontSizeConfig {
|
|
273
|
-
/**
|
|
274
|
-
* Available font size options. Expressed as predefined presets, numerical "pixel" values
|
|
275
|
-
* or the {@link module:font/fontconfig~FontSizeOption}.
|
|
276
|
-
*
|
|
277
|
-
* The default value is:
|
|
278
|
-
*
|
|
279
|
-
* ```ts
|
|
280
|
-
* const fontSizeConfig = {
|
|
281
|
-
* options: [
|
|
282
|
-
* 'tiny',
|
|
283
|
-
* 'small',
|
|
284
|
-
* 'default',
|
|
285
|
-
* 'big',
|
|
286
|
-
* 'huge'
|
|
287
|
-
* ]
|
|
288
|
-
* };
|
|
289
|
-
* ```
|
|
290
|
-
*
|
|
291
|
-
* It defines 4 sizes: **tiny**, **small**, **big**, and **huge**. These values will be rendered as `<span>` elements in the view.
|
|
292
|
-
* The **default** defines a text without the `fontSize` attribute.
|
|
293
|
-
*
|
|
294
|
-
* Each `<span>` has the the `class` attribute set to the corresponding size name. For instance, this is what the **small** size looks
|
|
295
|
-
* like in the view:
|
|
296
|
-
*
|
|
297
|
-
* ```html
|
|
298
|
-
* <span class="text-small">...</span>
|
|
299
|
-
* ```
|
|
300
|
-
*
|
|
301
|
-
* As an alternative, the font size might be defined using numerical values (either as a `Number` or as a `String`):
|
|
302
|
-
*
|
|
303
|
-
* ```ts
|
|
304
|
-
* const fontSizeConfig = {
|
|
305
|
-
* options: [ 9, 10, 11, 12, 13, 14, 15 ]
|
|
306
|
-
* };
|
|
307
|
-
* ```
|
|
308
|
-
*
|
|
309
|
-
* Also, you can define a label in the dropdown for numerical values:
|
|
310
|
-
*
|
|
311
|
-
* ```ts
|
|
312
|
-
* const fontSizeConfig = {
|
|
313
|
-
* options: [
|
|
314
|
-
* {
|
|
315
|
-
* title: 'Small',
|
|
316
|
-
* model: '8px'
|
|
317
|
-
* },
|
|
318
|
-
* 'default',
|
|
319
|
-
* {
|
|
320
|
-
* title: 'Big',
|
|
321
|
-
* model: '14px'
|
|
322
|
-
* }
|
|
323
|
-
* ]
|
|
324
|
-
* };
|
|
325
|
-
* ```
|
|
326
|
-
*
|
|
327
|
-
* Font size can be applied using the command API. To do that, use the `'fontSize'` command and pass the desired font size as a `value`.
|
|
328
|
-
* For example, the following code will apply the `fontSize` attribute with the **tiny** value to the current selection:
|
|
329
|
-
*
|
|
330
|
-
* ```ts
|
|
331
|
-
* editor.execute( 'fontSize', { value: 'tiny' } );
|
|
332
|
-
* ```
|
|
333
|
-
*
|
|
334
|
-
* Executing the `fontSize` command without value will remove the `fontSize` attribute from the current selection.
|
|
335
|
-
*/
|
|
336
|
-
options?: Array<string | number | FontSizeOption>;
|
|
337
|
-
/**
|
|
338
|
-
* By default the plugin removes any `font-size` value that does not match the plugin's configuration.
|
|
339
|
-
* It means that if you paste content with font sizes that the editor does not understand, the `font-size` attribute
|
|
340
|
-
* will be removed and the content will be displayed with the default size.
|
|
341
|
-
*
|
|
342
|
-
* You can preserve pasted font size values by switching the `supportAllValues` option to `true`:
|
|
343
|
-
*
|
|
344
|
-
* ```ts
|
|
345
|
-
* const fontSizeConfig = {
|
|
346
|
-
* options: [ 9, 10, 11, 12, 'default', 14, 15 ],
|
|
347
|
-
* supportAllValues: true
|
|
348
|
-
* };
|
|
349
|
-
* ```
|
|
350
|
-
*
|
|
351
|
-
* **Note:** This option can only be used with numerical values as font size options.
|
|
352
|
-
*
|
|
353
|
-
* With this configuration font sizes not specified in the editor configuration will not be removed when pasting the content.
|
|
354
|
-
*/
|
|
355
|
-
supportAllValues?: boolean;
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* The font size option descriptor.
|
|
359
|
-
*/
|
|
360
|
-
export interface FontSizeOption {
|
|
361
|
-
/**
|
|
362
|
-
* The user-readable title of the option.
|
|
363
|
-
*/
|
|
364
|
-
title: string;
|
|
365
|
-
/**
|
|
366
|
-
* The attribute's unique value in the model.
|
|
367
|
-
*/
|
|
368
|
-
model?: string;
|
|
369
|
-
/**
|
|
370
|
-
* View element configuration.
|
|
371
|
-
*/
|
|
372
|
-
view?: ViewElementDefinition;
|
|
373
|
-
/**
|
|
374
|
-
* An array with all matched elements that the view-to-model conversion should also accept.
|
|
375
|
-
*/
|
|
376
|
-
upcastAlso?: Array<MatcherPattern>;
|
|
377
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontfamily/fontfamilycommand
|
|
11
|
-
*/
|
|
12
|
-
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
-
import FontCommand from '../fontcommand.js';
|
|
14
|
-
/**
|
|
15
|
-
* The font family command. It is used by {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing}
|
|
16
|
-
* to apply the font family.
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* editor.execute( 'fontFamily', { value: 'Arial' } );
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* **Note**: Executing the command without the value removes the attribute from the model.
|
|
23
|
-
*/
|
|
24
|
-
export default class FontFamilyCommand extends FontCommand {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
constructor(editor: Editor);
|
|
29
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontfamily/fontfamilyediting
|
|
11
|
-
*/
|
|
12
|
-
import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The font family editing feature.
|
|
15
|
-
*
|
|
16
|
-
* It introduces the {@link module:font/fontfamily/fontfamilycommand~FontFamilyCommand command} and
|
|
17
|
-
* the `fontFamily` attribute in the {@link module:engine/model/model~Model model} which renders
|
|
18
|
-
* in the {@link module:engine/view/view view} as an inline `<span>` element (`<span style="font-family: Arial">`),
|
|
19
|
-
* depending on the {@link module:font/fontconfig~FontFamilyConfig configuration}.
|
|
20
|
-
*/
|
|
21
|
-
export default class FontFamilyEditing extends Plugin {
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
static get pluginName(): "FontFamilyEditing";
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
static get isOfficialPlugin(): true;
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
constructor(editor: Editor);
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
init(): void;
|
|
38
|
-
/**
|
|
39
|
-
* These converters enable keeping any value found as `style="font-family: *"` as a value of an attribute on a text even
|
|
40
|
-
* if it is not defined in the plugin configuration.
|
|
41
|
-
*/
|
|
42
|
-
private _prepareAnyValueConverters;
|
|
43
|
-
/**
|
|
44
|
-
* Adds support for legacy `<font face="..">` formatting.
|
|
45
|
-
*/
|
|
46
|
-
private _prepareCompatibilityConverter;
|
|
47
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontfamily/fontfamilyui
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The font family UI plugin. It introduces the `'fontFamily'` dropdown.
|
|
15
|
-
*/
|
|
16
|
-
export default class FontFamilyUI extends Plugin {
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
static get pluginName(): "FontFamilyUI";
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
static get isOfficialPlugin(): true;
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
init(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Returns options as defined in `config.fontFamily.options` but processed to account for
|
|
31
|
-
* editor localization, i.e. to display {@link module:font/fontconfig~FontFamilyOption}
|
|
32
|
-
* in the correct language.
|
|
33
|
-
*
|
|
34
|
-
* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}
|
|
35
|
-
* when the user configuration is defined because the editor does not exist yet.
|
|
36
|
-
*/
|
|
37
|
-
private _getLocalizedOptions;
|
|
38
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
import type { FontFamilyOption } from '../fontconfig.js';
|
|
10
|
-
/**
|
|
11
|
-
* @module font/fontfamily/utils
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Normalizes the {@link module:font/fontconfig~FontFamilyConfig#options configuration options}
|
|
15
|
-
* to the {@link module:font/fontconfig~FontFamilyOption} format.
|
|
16
|
-
*
|
|
17
|
-
* @param configuredOptions An array of options taken from the configuration.
|
|
18
|
-
*/
|
|
19
|
-
export declare function normalizeOptions(configuredOptions: Array<string | FontFamilyOption>): Array<FontFamilyOption>;
|
package/dist/fontfamily.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontfamily
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
import FontFamilyEditing from './fontfamily/fontfamilyediting.js';
|
|
14
|
-
import FontFamilyUI from './fontfamily/fontfamilyui.js';
|
|
15
|
-
/**
|
|
16
|
-
* The font family plugin.
|
|
17
|
-
*
|
|
18
|
-
* For a detailed overview, check the {@glink features/font font feature} documentatiom
|
|
19
|
-
* and the {@glink api/font package page}.
|
|
20
|
-
*
|
|
21
|
-
* This is a "glue" plugin which loads the {@link module:font/fontfamily/fontfamilyediting~FontFamilyEditing} and
|
|
22
|
-
* {@link module:font/fontfamily/fontfamilyui~FontFamilyUI} features in the editor.
|
|
23
|
-
*/
|
|
24
|
-
export default class FontFamily extends Plugin {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
static get requires(): readonly [typeof FontFamilyEditing, typeof FontFamilyUI];
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
static get pluginName(): "FontFamily";
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
static get isOfficialPlugin(): true;
|
|
37
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontsize/fontsizecommand
|
|
11
|
-
*/
|
|
12
|
-
import type { Editor } from 'ckeditor5/src/core.js';
|
|
13
|
-
import FontCommand from '../fontcommand.js';
|
|
14
|
-
/**
|
|
15
|
-
* The font size command. It is used by {@link module:font/fontsize/fontsizeediting~FontSizeEditing}
|
|
16
|
-
* to apply the font size.
|
|
17
|
-
*
|
|
18
|
-
* ```ts
|
|
19
|
-
* editor.execute( 'fontSize', { value: 'small' } );
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* **Note**: Executing the command without the value removes the attribute from the model.
|
|
23
|
-
*/
|
|
24
|
-
export default class FontSizeCommand extends FontCommand {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
constructor(editor: Editor);
|
|
29
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontsize/fontsizeediting
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
-
/**
|
|
14
|
-
* The font size editing feature.
|
|
15
|
-
*
|
|
16
|
-
* It introduces the {@link module:font/fontsize/fontsizecommand~FontSizeCommand command} and the `fontSize`
|
|
17
|
-
* attribute in the {@link module:engine/model/model~Model model} which renders in the {@link module:engine/view/view view}
|
|
18
|
-
* as a `<span>` element with either:
|
|
19
|
-
* * a style attribute (`<span style="font-size:12px">...</span>`),
|
|
20
|
-
* * or a class attribute (`<span class="text-small">...</span>`)
|
|
21
|
-
*
|
|
22
|
-
* depending on the {@link module:font/fontconfig~FontSizeConfig configuration}.
|
|
23
|
-
*/
|
|
24
|
-
export default class FontSizeEditing extends Plugin {
|
|
25
|
-
/**
|
|
26
|
-
* @inheritDoc
|
|
27
|
-
*/
|
|
28
|
-
static get pluginName(): "FontSizeEditing";
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
static get isOfficialPlugin(): true;
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
constructor(editor: Editor);
|
|
37
|
-
/**
|
|
38
|
-
* @inheritDoc
|
|
39
|
-
*/
|
|
40
|
-
init(): void;
|
|
41
|
-
/**
|
|
42
|
-
* These converters enable keeping any value found as `style="font-size: *"` as a value of an attribute on a text even
|
|
43
|
-
* if it is not defined in the plugin configuration.
|
|
44
|
-
*
|
|
45
|
-
* @param definition Converter definition out of input data.
|
|
46
|
-
*/
|
|
47
|
-
private _prepareAnyValueConverters;
|
|
48
|
-
/**
|
|
49
|
-
* Adds support for legacy `<font size="..">` formatting.
|
|
50
|
-
*/
|
|
51
|
-
private _prepareCompatibilityConverter;
|
|
52
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module font/fontsize/fontsizeui
|
|
11
|
-
*/
|
|
12
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
-
import '../../theme/fontsize.css';
|
|
14
|
-
/**
|
|
15
|
-
* The font size UI plugin. It introduces the `'fontSize'` dropdown.
|
|
16
|
-
*/
|
|
17
|
-
export default class FontSizeUI extends Plugin {
|
|
18
|
-
/**
|
|
19
|
-
* @inheritDoc
|
|
20
|
-
*/
|
|
21
|
-
static get pluginName(): "FontSizeUI";
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
static get isOfficialPlugin(): true;
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
init(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Returns options as defined in `config.fontSize.options` but processed to account for
|
|
32
|
-
* editor localization, i.e. to display {@link module:font/fontconfig~FontSizeOption}
|
|
33
|
-
* in the correct language.
|
|
34
|
-
*
|
|
35
|
-
* Note: The reason behind this method is that there is no way to use {@link module:utils/locale~Locale#t}
|
|
36
|
-
* when the user configuration is defined because the editor does not exist yet.
|
|
37
|
-
*/
|
|
38
|
-
private _getLocalizedOptions;
|
|
39
|
-
}
|
package/dist/fontsize/utils.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2024, 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
|
-
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
import { type FontSizeOption } from '../fontconfig.js';
|
|
10
|
-
/**
|
|
11
|
-
* Normalizes and translates the {@link module:font/fontconfig~FontSizeConfig#options configuration options}
|
|
12
|
-
* to the {@link module:font/fontconfig~FontSizeOption} format.
|
|
13
|
-
*
|
|
14
|
-
* @param configuredOptions An array of options taken from the configuration.
|
|
15
|
-
*/
|
|
16
|
-
export declare function normalizeOptions(configuredOptions: Array<string | number | FontSizeOption>): Array<FontSizeOption>;
|