@ckeditor/ckeditor5-style 47.6.1-alpha.1 → 48.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/LICENSE.md +1 -1
- package/ckeditor5-metadata.json +1 -1
- package/dist/index-editor.css +117 -15
- package/dist/index.css +116 -19
- package/dist/index.css.map +1 -1
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/{src → dist}/integrations/link.d.ts +3 -2
- package/{src → dist}/integrations/list.d.ts +3 -2
- package/{src → dist}/integrations/table.d.ts +1 -1
- package/{src → dist}/style.d.ts +1 -1
- package/{src → dist}/stylecommand.d.ts +1 -1
- package/{src → dist}/styleediting.d.ts +3 -2
- package/{src → dist}/styleui.d.ts +1 -1
- package/{src → dist}/styleutils.d.ts +4 -4
- package/{src → dist}/ui/stylegridbuttonview.d.ts +2 -2
- package/{src → dist}/ui/stylegridview.d.ts +2 -2
- package/{src → dist}/ui/stylegroupview.d.ts +2 -2
- package/{src → dist}/ui/stylepanelview.d.ts +2 -2
- package/package.json +27 -50
- package/build/style.js +0 -5
- package/build/translations/af.js +0 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/ast.js +0 -1
- package/build/translations/az.js +0 -1
- package/build/translations/be.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/bs.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/en-gb.js +0 -1
- package/build/translations/eo.js +0 -1
- package/build/translations/es-co.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/eu.js +0 -1
- package/build/translations/fa.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/gu.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/hy.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/kk.js +0 -1
- package/build/translations/km.js +0 -1
- package/build/translations/kn.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/ku.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nb.js +0 -1
- package/build/translations/ne.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/oc.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/si.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sl.js +0 -1
- package/build/translations/sq.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/ti.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/tt.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/ur.js +0 -1
- package/build/translations/uz.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
- package/lang/contexts.json +0 -6
- package/lang/translations/af.po +0 -28
- package/lang/translations/ar.po +0 -28
- package/lang/translations/ast.po +0 -28
- package/lang/translations/az.po +0 -28
- package/lang/translations/be.po +0 -28
- package/lang/translations/bg.po +0 -28
- package/lang/translations/bn.po +0 -28
- package/lang/translations/bs.po +0 -28
- package/lang/translations/ca.po +0 -28
- package/lang/translations/cs.po +0 -28
- package/lang/translations/da.po +0 -28
- package/lang/translations/de-ch.po +0 -28
- package/lang/translations/de.po +0 -28
- package/lang/translations/el.po +0 -28
- package/lang/translations/en-au.po +0 -28
- package/lang/translations/en-gb.po +0 -28
- package/lang/translations/en.po +0 -28
- package/lang/translations/eo.po +0 -28
- package/lang/translations/es-co.po +0 -28
- package/lang/translations/es.po +0 -28
- package/lang/translations/et.po +0 -28
- package/lang/translations/eu.po +0 -28
- package/lang/translations/fa.po +0 -28
- package/lang/translations/fi.po +0 -28
- package/lang/translations/fr.po +0 -28
- package/lang/translations/gl.po +0 -28
- package/lang/translations/gu.po +0 -28
- package/lang/translations/he.po +0 -28
- package/lang/translations/hi.po +0 -28
- package/lang/translations/hr.po +0 -28
- package/lang/translations/hu.po +0 -28
- package/lang/translations/hy.po +0 -28
- package/lang/translations/id.po +0 -28
- package/lang/translations/it.po +0 -28
- package/lang/translations/ja.po +0 -28
- package/lang/translations/jv.po +0 -28
- package/lang/translations/kk.po +0 -28
- package/lang/translations/km.po +0 -28
- package/lang/translations/kn.po +0 -28
- package/lang/translations/ko.po +0 -28
- package/lang/translations/ku.po +0 -28
- package/lang/translations/lt.po +0 -28
- package/lang/translations/lv.po +0 -28
- package/lang/translations/ms.po +0 -28
- package/lang/translations/nb.po +0 -28
- package/lang/translations/ne.po +0 -28
- package/lang/translations/nl.po +0 -28
- package/lang/translations/no.po +0 -28
- package/lang/translations/oc.po +0 -28
- package/lang/translations/pl.po +0 -28
- package/lang/translations/pt-br.po +0 -28
- package/lang/translations/pt.po +0 -28
- package/lang/translations/ro.po +0 -28
- package/lang/translations/ru.po +0 -28
- package/lang/translations/si.po +0 -28
- package/lang/translations/sk.po +0 -28
- package/lang/translations/sl.po +0 -28
- package/lang/translations/sq.po +0 -28
- package/lang/translations/sr-latn.po +0 -28
- package/lang/translations/sr.po +0 -28
- package/lang/translations/sv.po +0 -28
- package/lang/translations/th.po +0 -28
- package/lang/translations/ti.po +0 -28
- package/lang/translations/tk.po +0 -28
- package/lang/translations/tr.po +0 -28
- package/lang/translations/tt.po +0 -28
- package/lang/translations/ug.po +0 -28
- package/lang/translations/uk.po +0 -28
- package/lang/translations/ur.po +0 -28
- package/lang/translations/uz.po +0 -28
- package/lang/translations/vi.po +0 -28
- package/lang/translations/zh-cn.po +0 -28
- package/lang/translations/zh.po +0 -28
- package/src/augmentation.js +0 -5
- package/src/index.js +0 -20
- package/src/integrations/link.js +0 -164
- package/src/integrations/list.js +0 -151
- package/src/integrations/table.js +0 -123
- package/src/style.js +0 -36
- package/src/stylecommand.js +0 -208
- package/src/styleconfig.js +0 -5
- package/src/styleediting.js +0 -52
- package/src/styleui.js +0 -100
- package/src/styleutils.js +0 -275
- package/src/ui/stylegridbuttonview.js +0 -65
- package/src/ui/stylegridview.js +0 -103
- package/src/ui/stylegroupview.js +0 -55
- package/src/ui/stylepanelview.js +0 -125
- package/theme/style.css +0 -4
- package/theme/stylegrid.css +0 -29
- package/theme/stylegroup.css +0 -4
- package/theme/stylepanel.css +0 -5
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
- /package/{src → dist}/styleconfig.d.ts +0 -0
package/lang/translations/tt.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: tt\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr ""
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr ""
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr ""
|
package/lang/translations/ug.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: ug\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr "ئۇسلۇب"
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr "كۆپ ئۇسلۇب"
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr "بۆلەك ئۇسلۇبى"
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr "تېكىست ئۇسلۇبى"
|
package/lang/translations/uk.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: uk\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 "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr "Стилі"
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr "Кілька стилів"
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr "Стилі блоку"
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr "Стилі тексту"
|
package/lang/translations/ur.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: ur\n"
|
|
11
|
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr "انداز"
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr "متعدد انداز"
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr "خانہ کے انداز"
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr "متن کے انداز"
|
package/lang/translations/uz.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: uz\n"
|
|
11
|
-
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr ""
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr ""
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr ""
|
package/lang/translations/vi.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: vi\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr "Kiểu"
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr "Nhiều kiểu"
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr "Kiểu của khối"
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr "Kiểu văn bản"
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: zh_CN\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr "样式"
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr "多样式"
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr "块级样式"
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr "文本样式"
|
package/lang/translations/zh.po
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, 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: zh_TW\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
15
|
-
msgid "Styles"
|
|
16
|
-
msgstr "樣式"
|
|
17
|
-
|
|
18
|
-
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
19
|
-
msgid "Multiple styles"
|
|
20
|
-
msgstr "多重樣式"
|
|
21
|
-
|
|
22
|
-
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
23
|
-
msgid "Block styles"
|
|
24
|
-
msgstr "區塊樣式"
|
|
25
|
-
|
|
26
|
-
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
27
|
-
msgid "Text styles"
|
|
28
|
-
msgstr "文字樣式"
|
package/src/augmentation.js
DELETED
package/src/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
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
|
-
/**
|
|
6
|
-
* @module style
|
|
7
|
-
*/
|
|
8
|
-
export { Style } from './style.js';
|
|
9
|
-
export { StyleEditing } from './styleediting.js';
|
|
10
|
-
export { StyleUI } from './styleui.js';
|
|
11
|
-
export { StyleCommand } from './stylecommand.js';
|
|
12
|
-
export { StyleUtils } from './styleutils.js';
|
|
13
|
-
export { LinkStyleSupport } from './integrations/link.js';
|
|
14
|
-
export { ListStyleSupport } from './integrations/list.js';
|
|
15
|
-
export { TableStyleSupport } from './integrations/table.js';
|
|
16
|
-
export { StyleGridButtonView as _StyleGridButtonView } from './ui/stylegridbuttonview.js';
|
|
17
|
-
export { StyleGridView as _StyleGridView } from './ui/stylegridview.js';
|
|
18
|
-
export { StyleGroupView as _StyleGroupView } from './ui/stylegroupview.js';
|
|
19
|
-
export { StylePanelView as _StylePanelView } from './ui/stylepanelview.js';
|
|
20
|
-
import './augmentation.js';
|
package/src/integrations/link.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/**
|
|
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
|
-
/**
|
|
6
|
-
* @module style/integrations/link
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import { findAttributeRange, findAttributeRangeBound } from 'ckeditor5/src/typing.js';
|
|
10
|
-
import { StyleUtils } from '../styleutils.js';
|
|
11
|
-
export class LinkStyleSupport extends Plugin {
|
|
12
|
-
_styleUtils;
|
|
13
|
-
_htmlSupport;
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
static get pluginName() {
|
|
18
|
-
return 'LinkStyleSupport';
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
static get isOfficialPlugin() {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
static get requires() {
|
|
30
|
-
return [StyleUtils, 'GeneralHtmlSupport'];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
init() {
|
|
36
|
-
const editor = this.editor;
|
|
37
|
-
if (!editor.plugins.has('LinkEditing')) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
this._styleUtils = editor.plugins.get(StyleUtils);
|
|
41
|
-
this._htmlSupport = this.editor.plugins.get('GeneralHtmlSupport');
|
|
42
|
-
this.listenTo(this._styleUtils, 'isStyleEnabledForInlineSelection', (evt, [definition, selection]) => {
|
|
43
|
-
if (definition.element == 'a') {
|
|
44
|
-
evt.return = this._isStyleEnabled(definition, selection);
|
|
45
|
-
evt.stop();
|
|
46
|
-
}
|
|
47
|
-
}, { priority: 'high' });
|
|
48
|
-
this.listenTo(this._styleUtils, 'isStyleActiveForInlineSelection', (evt, [definition, selection]) => {
|
|
49
|
-
if (definition.element == 'a') {
|
|
50
|
-
evt.return = this._isStyleActive(definition, selection);
|
|
51
|
-
evt.stop();
|
|
52
|
-
}
|
|
53
|
-
}, { priority: 'high' });
|
|
54
|
-
this.listenTo(this._styleUtils, 'getAffectedInlineSelectable', (evt, [definition, selection]) => {
|
|
55
|
-
if (definition.element != 'a') {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const selectable = this._getAffectedSelectable(definition, selection);
|
|
59
|
-
if (selectable) {
|
|
60
|
-
evt.return = selectable;
|
|
61
|
-
evt.stop();
|
|
62
|
-
}
|
|
63
|
-
}, { priority: 'high' });
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Verifies if the given style is applicable to the provided document selection.
|
|
67
|
-
*/
|
|
68
|
-
_isStyleEnabled(definition, selection) {
|
|
69
|
-
const model = this.editor.model;
|
|
70
|
-
// Handle collapsed selection.
|
|
71
|
-
if (selection.isCollapsed) {
|
|
72
|
-
return selection.hasAttribute('linkHref');
|
|
73
|
-
}
|
|
74
|
-
// Non-collapsed selection.
|
|
75
|
-
for (const range of selection.getRanges()) {
|
|
76
|
-
for (const item of range.getItems()) {
|
|
77
|
-
if ((item.is('$textProxy') || model.schema.isInline(item)) && item.hasAttribute('linkHref')) {
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Returns true if the given style is applied to the specified document selection.
|
|
86
|
-
*/
|
|
87
|
-
_isStyleActive(definition, selection) {
|
|
88
|
-
const model = this.editor.model;
|
|
89
|
-
const attributeName = this._htmlSupport.getGhsAttributeNameForElement(definition.element);
|
|
90
|
-
// Handle collapsed selection.
|
|
91
|
-
if (selection.isCollapsed) {
|
|
92
|
-
if (selection.hasAttribute('linkHref')) {
|
|
93
|
-
const ghsAttributeValue = selection.getAttribute(attributeName);
|
|
94
|
-
if (this._styleUtils.hasAllClasses(ghsAttributeValue, definition.classes)) {
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
// Non-collapsed selection.
|
|
101
|
-
for (const range of selection.getRanges()) {
|
|
102
|
-
for (const item of range.getItems()) {
|
|
103
|
-
if ((item.is('$textProxy') || model.schema.isInline(item)) && item.hasAttribute('linkHref')) {
|
|
104
|
-
const ghsAttributeValue = item.getAttribute(attributeName);
|
|
105
|
-
return this._styleUtils.hasAllClasses(ghsAttributeValue, definition.classes);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Returns a selectable that given style should be applied to.
|
|
113
|
-
*/
|
|
114
|
-
_getAffectedSelectable(definition, selection) {
|
|
115
|
-
const model = this.editor.model;
|
|
116
|
-
// Handle collapsed selection.
|
|
117
|
-
if (selection.isCollapsed) {
|
|
118
|
-
const linkHref = selection.getAttribute('linkHref');
|
|
119
|
-
return findAttributeRange(selection.getFirstPosition(), 'linkHref', linkHref, model);
|
|
120
|
-
}
|
|
121
|
-
// Non-collapsed selection.
|
|
122
|
-
const ranges = [];
|
|
123
|
-
for (const range of selection.getRanges()) {
|
|
124
|
-
// First expand range to include the whole link.
|
|
125
|
-
const expandedRange = model.createRange(expandAttributePosition(range.start, 'linkHref', true, model), expandAttributePosition(range.end, 'linkHref', false, model));
|
|
126
|
-
// Pick only ranges on links.
|
|
127
|
-
for (const item of expandedRange.getItems()) {
|
|
128
|
-
if ((item.is('$textProxy') || model.schema.isInline(item)) && item.hasAttribute('linkHref')) {
|
|
129
|
-
ranges.push(this.editor.model.createRangeOn(item));
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Make sure that we have a continuous range on a link
|
|
134
|
-
// (not split between text nodes with mixed attributes like bold etc.)
|
|
135
|
-
return normalizeRanges(ranges);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Walks forward or backward (depends on the `lookBack` flag), node by node, as long as they have the same attribute value
|
|
140
|
-
* and returns a position just before or after (depends on the `lookBack` flag) the last matched node.
|
|
141
|
-
*/
|
|
142
|
-
function expandAttributePosition(position, attributeName, lookBack, model) {
|
|
143
|
-
const referenceNode = position.textNode || (lookBack ? position.nodeAfter : position.nodeBefore);
|
|
144
|
-
if (!referenceNode || !referenceNode.hasAttribute(attributeName)) {
|
|
145
|
-
return position;
|
|
146
|
-
}
|
|
147
|
-
const attributeValue = referenceNode.getAttribute(attributeName);
|
|
148
|
-
return findAttributeRangeBound(position, attributeName, attributeValue, lookBack, model);
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Normalizes list of ranges by joining intersecting or "touching" ranges.
|
|
152
|
-
*
|
|
153
|
-
* Note: It assumes that ranges are sorted.
|
|
154
|
-
*/
|
|
155
|
-
function normalizeRanges(ranges) {
|
|
156
|
-
for (let i = 1; i < ranges.length; i++) {
|
|
157
|
-
const joinedRange = ranges[i - 1].getJoined(ranges[i]);
|
|
158
|
-
if (joinedRange) {
|
|
159
|
-
// Replace the ranges on the list with the new joined range.
|
|
160
|
-
ranges.splice(--i, 2, joinedRange);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return ranges;
|
|
164
|
-
}
|
package/src/integrations/list.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/**
|
|
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
|
-
/**
|
|
6
|
-
* @module style/integrations/list
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import { StyleUtils } from '../styleutils.js';
|
|
10
|
-
export class ListStyleSupport extends Plugin {
|
|
11
|
-
_listUtils;
|
|
12
|
-
_styleUtils;
|
|
13
|
-
_htmlSupport;
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
static get pluginName() {
|
|
18
|
-
return 'ListStyleSupport';
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
static get isOfficialPlugin() {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
static get requires() {
|
|
30
|
-
return [StyleUtils, 'GeneralHtmlSupport'];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
init() {
|
|
36
|
-
const editor = this.editor;
|
|
37
|
-
if (!editor.plugins.has('ListEditing')) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
this._styleUtils = editor.plugins.get(StyleUtils);
|
|
41
|
-
this._listUtils = this.editor.plugins.get('ListUtils');
|
|
42
|
-
this._htmlSupport = this.editor.plugins.get('GeneralHtmlSupport');
|
|
43
|
-
this.listenTo(this._styleUtils, 'isStyleEnabledForBlock', (evt, [definition, block]) => {
|
|
44
|
-
if (this._isStyleEnabledForBlock(definition, block)) {
|
|
45
|
-
evt.return = true;
|
|
46
|
-
evt.stop();
|
|
47
|
-
}
|
|
48
|
-
}, { priority: 'high' });
|
|
49
|
-
this.listenTo(this._styleUtils, 'isStyleActiveForBlock', (evt, [definition, block]) => {
|
|
50
|
-
if (this._isStyleActiveForBlock(definition, block)) {
|
|
51
|
-
evt.return = true;
|
|
52
|
-
evt.stop();
|
|
53
|
-
}
|
|
54
|
-
}, { priority: 'high' });
|
|
55
|
-
this.listenTo(this._styleUtils, 'getAffectedBlocks', (evt, [definition, block]) => {
|
|
56
|
-
const blocks = this._getAffectedBlocks(definition, block);
|
|
57
|
-
if (blocks) {
|
|
58
|
-
evt.return = blocks;
|
|
59
|
-
evt.stop();
|
|
60
|
-
}
|
|
61
|
-
}, { priority: 'high' });
|
|
62
|
-
this.listenTo(this._styleUtils, 'getStylePreview', (evt, [definition, children]) => {
|
|
63
|
-
const templateDefinition = this._getStylePreview(definition, children);
|
|
64
|
-
if (templateDefinition) {
|
|
65
|
-
evt.return = templateDefinition;
|
|
66
|
-
evt.stop();
|
|
67
|
-
}
|
|
68
|
-
}, { priority: 'high' });
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Verifies if the given style is applicable to the provided block element.
|
|
72
|
-
*/
|
|
73
|
-
_isStyleEnabledForBlock(definition, block) {
|
|
74
|
-
const model = this.editor.model;
|
|
75
|
-
if (!['ol', 'ul', 'li'].includes(definition.element)) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
if (!this._listUtils.isListItemBlock(block)) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
const attributeName = this._htmlSupport.getGhsAttributeNameForElement(definition.element);
|
|
82
|
-
if (definition.element == 'ol' || definition.element == 'ul') {
|
|
83
|
-
if (!model.schema.checkAttribute(block, attributeName)) {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
const isNumbered = this._listUtils.isNumberedListType(block.getAttribute('listType'));
|
|
87
|
-
const viewElementName = isNumbered ? 'ol' : 'ul';
|
|
88
|
-
return definition.element == viewElementName;
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
return model.schema.checkAttribute(block, attributeName);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Returns true if the given style is applied to the specified block element.
|
|
96
|
-
*/
|
|
97
|
-
_isStyleActiveForBlock(definition, block) {
|
|
98
|
-
const attributeName = this._htmlSupport.getGhsAttributeNameForElement(definition.element);
|
|
99
|
-
const ghsAttributeValue = block.getAttribute(attributeName);
|
|
100
|
-
return this._styleUtils.hasAllClasses(ghsAttributeValue, definition.classes);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Returns an array of block elements that style should be applied to.
|
|
104
|
-
*/
|
|
105
|
-
_getAffectedBlocks(definition, block) {
|
|
106
|
-
if (!this._isStyleEnabledForBlock(definition, block)) {
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
if (definition.element == 'li') {
|
|
110
|
-
return this._listUtils.expandListBlocksToCompleteItems(block, { withNested: false });
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
return this._listUtils.expandListBlocksToCompleteList(block);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Returns a view template definition for the style preview.
|
|
118
|
-
*/
|
|
119
|
-
_getStylePreview(definition, children) {
|
|
120
|
-
const { element, classes } = definition;
|
|
121
|
-
if (element == 'ol' || element == 'ul') {
|
|
122
|
-
return {
|
|
123
|
-
tag: element,
|
|
124
|
-
attributes: {
|
|
125
|
-
class: classes
|
|
126
|
-
},
|
|
127
|
-
children: [
|
|
128
|
-
{
|
|
129
|
-
tag: 'li',
|
|
130
|
-
children
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
else if (element == 'li') {
|
|
136
|
-
return {
|
|
137
|
-
tag: 'ol',
|
|
138
|
-
children: [
|
|
139
|
-
{
|
|
140
|
-
tag: element,
|
|
141
|
-
attributes: {
|
|
142
|
-
class: classes
|
|
143
|
-
},
|
|
144
|
-
children
|
|
145
|
-
}
|
|
146
|
-
]
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
}
|