@ckeditor/ckeditor5-alignment 0.0.0-internal-20241017.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/CHANGELOG.md +4 -0
- package/LICENSE.md +17 -0
- package/README.md +26 -0
- package/build/alignment.js +5 -0
- package/build/translations/af.js +1 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/es-co.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/kk.js +1 -0
- package/build/translations/km.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/ne.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sl.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +31 -0
- package/dist/alignment.d.ts +37 -0
- package/dist/alignmentcommand.d.ts +47 -0
- package/dist/alignmentconfig.d.ts +76 -0
- package/dist/alignmentediting.d.ts +34 -0
- package/dist/alignmentui.d.ts +73 -0
- package/dist/augmentation.d.ts +27 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +559 -0
- package/dist/index.js.map +1 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +5 -0
- package/dist/translations/af.umd.js +11 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es-co.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/kk.d.ts +8 -0
- package/dist/translations/kk.js +5 -0
- package/dist/translations/kk.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sl.d.ts +8 -0
- package/dist/translations/sl.js +5 -0
- package/dist/translations/sl.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/utils.d.ts +43 -0
- package/lang/contexts.json +8 -0
- package/lang/translations/af.po +42 -0
- package/lang/translations/ar.po +42 -0
- package/lang/translations/az.po +42 -0
- package/lang/translations/bg.po +42 -0
- package/lang/translations/bn.po +42 -0
- package/lang/translations/bs.po +42 -0
- package/lang/translations/ca.po +42 -0
- package/lang/translations/cs.po +42 -0
- package/lang/translations/da.po +42 -0
- package/lang/translations/de-ch.po +42 -0
- package/lang/translations/de.po +42 -0
- package/lang/translations/el.po +42 -0
- package/lang/translations/en-au.po +42 -0
- package/lang/translations/en-gb.po +42 -0
- package/lang/translations/en.po +42 -0
- package/lang/translations/es-co.po +42 -0
- package/lang/translations/es.po +42 -0
- package/lang/translations/et.po +42 -0
- package/lang/translations/fa.po +42 -0
- package/lang/translations/fi.po +42 -0
- package/lang/translations/fr.po +42 -0
- package/lang/translations/gl.po +42 -0
- package/lang/translations/he.po +42 -0
- package/lang/translations/hi.po +42 -0
- package/lang/translations/hr.po +42 -0
- package/lang/translations/hu.po +42 -0
- package/lang/translations/id.po +42 -0
- package/lang/translations/it.po +42 -0
- package/lang/translations/ja.po +42 -0
- package/lang/translations/jv.po +42 -0
- package/lang/translations/kk.po +42 -0
- package/lang/translations/km.po +42 -0
- package/lang/translations/ko.po +42 -0
- package/lang/translations/ku.po +42 -0
- package/lang/translations/lt.po +42 -0
- package/lang/translations/lv.po +42 -0
- package/lang/translations/ms.po +42 -0
- package/lang/translations/nb.po +42 -0
- package/lang/translations/ne.po +42 -0
- package/lang/translations/nl.po +42 -0
- package/lang/translations/no.po +42 -0
- package/lang/translations/pl.po +42 -0
- package/lang/translations/pt-br.po +42 -0
- package/lang/translations/pt.po +42 -0
- package/lang/translations/ro.po +42 -0
- package/lang/translations/ru.po +42 -0
- package/lang/translations/sk.po +42 -0
- package/lang/translations/sl.po +42 -0
- package/lang/translations/sq.po +42 -0
- package/lang/translations/sr-latn.po +42 -0
- package/lang/translations/sr.po +42 -0
- package/lang/translations/sv.po +42 -0
- package/lang/translations/th.po +42 -0
- package/lang/translations/ti.po +42 -0
- package/lang/translations/tk.po +42 -0
- package/lang/translations/tr.po +42 -0
- package/lang/translations/tt.po +42 -0
- package/lang/translations/ug.po +42 -0
- package/lang/translations/uk.po +42 -0
- package/lang/translations/ur.po +42 -0
- package/lang/translations/uz.po +42 -0
- package/lang/translations/vi.po +42 -0
- package/lang/translations/zh-cn.po +42 -0
- package/lang/translations/zh.po +42 -0
- package/package.json +41 -0
- package/src/alignment.d.ts +33 -0
- package/src/alignment.js +39 -0
- package/src/alignmentcommand.d.ts +43 -0
- package/src/alignmentcommand.js +88 -0
- package/src/alignmentconfig.d.ts +72 -0
- package/src/alignmentconfig.js +5 -0
- package/src/alignmentediting.d.ts +30 -0
- package/src/alignmentediting.js +153 -0
- package/src/alignmentui.d.ts +69 -0
- package/src/alignmentui.js +194 -0
- package/src/augmentation.d.ts +23 -0
- package/src/augmentation.js +5 -0
- package/src/index.d.ts +13 -0
- package/src/index.js +11 -0
- package/src/utils.d.ts +39 -0
- package/src/utils.js +118 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
|
|
16
|
+
"Language: zh_TW\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
|
+
|
|
20
|
+
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
21
|
+
msgid "Align left"
|
|
22
|
+
msgstr "靠左對齊"
|
|
23
|
+
|
|
24
|
+
msgctxt "Toolbar button tooltip for aligning the text to the right."
|
|
25
|
+
msgid "Align right"
|
|
26
|
+
msgstr "靠右對齊"
|
|
27
|
+
|
|
28
|
+
msgctxt "Toolbar button tooltip for aligning the text to center."
|
|
29
|
+
msgid "Align center"
|
|
30
|
+
msgstr "置中對齊"
|
|
31
|
+
|
|
32
|
+
msgctxt "Toolbar button tooltip for making the text justified."
|
|
33
|
+
msgid "Justify"
|
|
34
|
+
msgstr "左右對齊"
|
|
35
|
+
|
|
36
|
+
msgctxt "Dropdown button tooltip for the text alignment feature."
|
|
37
|
+
msgid "Text alignment"
|
|
38
|
+
msgstr "文字對齊"
|
|
39
|
+
|
|
40
|
+
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
41
|
+
msgid "Text alignment toolbar"
|
|
42
|
+
msgstr "文字對齊"
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ckeditor/ckeditor5-alignment",
|
|
3
|
+
"version": "0.0.0-internal-20241017.0",
|
|
4
|
+
"description": "Text alignment feature for CKEditor 5.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ckeditor",
|
|
7
|
+
"ckeditor5",
|
|
8
|
+
"ckeditor 5",
|
|
9
|
+
"ckeditor5-feature",
|
|
10
|
+
"ckeditor5-plugin",
|
|
11
|
+
"ckeditor5-dll"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "src/index.js",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@ckeditor/ckeditor5-core": "0.0.0-internal-20241017.0",
|
|
17
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-internal-20241017.0",
|
|
18
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-internal-20241017.0",
|
|
19
|
+
"ckeditor5": "0.0.0-internal-20241017.0"
|
|
20
|
+
},
|
|
21
|
+
"author": "CKSource (http://cksource.com/)",
|
|
22
|
+
"license": "GPL-2.0-or-later",
|
|
23
|
+
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
24
|
+
"bugs": "https://github.com/ckeditor/ckeditor5/issues",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/ckeditor/ckeditor5.git",
|
|
28
|
+
"directory": "packages/ckeditor5-alignment"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"lang",
|
|
33
|
+
"src/**/*.js",
|
|
34
|
+
"src/**/*.d.ts",
|
|
35
|
+
"theme",
|
|
36
|
+
"build",
|
|
37
|
+
"ckeditor5-metadata.json",
|
|
38
|
+
"CHANGELOG.md"
|
|
39
|
+
],
|
|
40
|
+
"types": "src/index.d.ts"
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
* @module alignment/alignment
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import AlignmentEditing from './alignmentediting.js';
|
|
10
|
+
import AlignmentUI from './alignmentui.js';
|
|
11
|
+
/**
|
|
12
|
+
* The text alignment plugin.
|
|
13
|
+
*
|
|
14
|
+
* For a detailed overview, check the {@glink features/text-alignment Text alignment} feature guide
|
|
15
|
+
* and the {@glink api/alignment package page}.
|
|
16
|
+
*
|
|
17
|
+
* This is a "glue" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and
|
|
18
|
+
* {@link module:alignment/alignmentui~AlignmentUI} plugins.
|
|
19
|
+
*/
|
|
20
|
+
export default class Alignment extends Plugin {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly [typeof AlignmentEditing, typeof AlignmentUI];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "Alignment";
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get isOfficialPlugin(): true;
|
|
33
|
+
}
|
package/src/alignment.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
* @module alignment/alignment
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import AlignmentEditing from './alignmentediting.js';
|
|
10
|
+
import AlignmentUI from './alignmentui.js';
|
|
11
|
+
/**
|
|
12
|
+
* The text alignment plugin.
|
|
13
|
+
*
|
|
14
|
+
* For a detailed overview, check the {@glink features/text-alignment Text alignment} feature guide
|
|
15
|
+
* and the {@glink api/alignment package page}.
|
|
16
|
+
*
|
|
17
|
+
* This is a "glue" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and
|
|
18
|
+
* {@link module:alignment/alignmentui~AlignmentUI} plugins.
|
|
19
|
+
*/
|
|
20
|
+
export default class Alignment extends Plugin {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires() {
|
|
25
|
+
return [AlignmentEditing, AlignmentUI];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get pluginName() {
|
|
31
|
+
return 'Alignment';
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
static get isOfficialPlugin() {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* @module alignment/alignmentcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
import type { SupportedOption } from './alignmentconfig.js';
|
|
10
|
+
/**
|
|
11
|
+
* The alignment command plugin.
|
|
12
|
+
*/
|
|
13
|
+
export default class AlignmentCommand extends Command {
|
|
14
|
+
/**
|
|
15
|
+
* A value of the current block's alignment.
|
|
16
|
+
*
|
|
17
|
+
* @observable
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
value: SupportedOption;
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
refresh(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Executes the command. Applies the alignment `value` to the selected blocks.
|
|
27
|
+
* If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,
|
|
28
|
+
* the command will remove the attribute from the selected blocks.
|
|
29
|
+
*
|
|
30
|
+
* @param options Options for the executed command.
|
|
31
|
+
* @param options.value The value to apply.
|
|
32
|
+
* @fires execute
|
|
33
|
+
*/
|
|
34
|
+
execute(options?: {
|
|
35
|
+
value?: SupportedOption;
|
|
36
|
+
}): void;
|
|
37
|
+
/**
|
|
38
|
+
* Checks whether a block can have alignment set.
|
|
39
|
+
*
|
|
40
|
+
* @param block The block to be checked.
|
|
41
|
+
*/
|
|
42
|
+
private _canBeAligned;
|
|
43
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
* @module alignment/alignmentcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { first } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { isDefault } from './utils.js';
|
|
11
|
+
const ALIGNMENT = 'alignment';
|
|
12
|
+
/**
|
|
13
|
+
* The alignment command plugin.
|
|
14
|
+
*/
|
|
15
|
+
export default class AlignmentCommand extends Command {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
refresh() {
|
|
20
|
+
const editor = this.editor;
|
|
21
|
+
const locale = editor.locale;
|
|
22
|
+
const firstBlock = first(this.editor.model.document.selection.getSelectedBlocks());
|
|
23
|
+
// As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled.
|
|
24
|
+
this.isEnabled = Boolean(firstBlock) && this._canBeAligned(firstBlock);
|
|
25
|
+
if (this.isEnabled && firstBlock.hasAttribute('alignment')) {
|
|
26
|
+
this.value = firstBlock.getAttribute('alignment');
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Executes the command. Applies the alignment `value` to the selected blocks.
|
|
34
|
+
* If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,
|
|
35
|
+
* the command will remove the attribute from the selected blocks.
|
|
36
|
+
*
|
|
37
|
+
* @param options Options for the executed command.
|
|
38
|
+
* @param options.value The value to apply.
|
|
39
|
+
* @fires execute
|
|
40
|
+
*/
|
|
41
|
+
execute(options = {}) {
|
|
42
|
+
const editor = this.editor;
|
|
43
|
+
const locale = editor.locale;
|
|
44
|
+
const model = editor.model;
|
|
45
|
+
const doc = model.document;
|
|
46
|
+
const value = options.value;
|
|
47
|
+
model.change(writer => {
|
|
48
|
+
// Get only those blocks from selected that can have alignment set
|
|
49
|
+
const blocks = Array.from(doc.selection.getSelectedBlocks()).filter(block => this._canBeAligned(block));
|
|
50
|
+
const currentAlignment = blocks[0].getAttribute('alignment');
|
|
51
|
+
// Remove alignment attribute if current alignment is:
|
|
52
|
+
// - default (should not be stored in model as it will bloat model data)
|
|
53
|
+
// - equal to currently set
|
|
54
|
+
// - or no value is passed - denotes default alignment.
|
|
55
|
+
const removeAlignment = isDefault(value, locale) || currentAlignment === value || !value;
|
|
56
|
+
if (removeAlignment) {
|
|
57
|
+
removeAlignmentFromSelection(blocks, writer);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
setAlignmentOnSelection(blocks, writer, value);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Checks whether a block can have alignment set.
|
|
66
|
+
*
|
|
67
|
+
* @param block The block to be checked.
|
|
68
|
+
*/
|
|
69
|
+
_canBeAligned(block) {
|
|
70
|
+
return this.editor.model.schema.checkAttribute(block, ALIGNMENT);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Removes the alignment attribute from blocks.
|
|
75
|
+
*/
|
|
76
|
+
function removeAlignmentFromSelection(blocks, writer) {
|
|
77
|
+
for (const block of blocks) {
|
|
78
|
+
writer.removeAttribute(ALIGNMENT, block);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Sets the alignment attribute on blocks.
|
|
83
|
+
*/
|
|
84
|
+
function setAlignmentOnSelection(blocks, writer, alignment) {
|
|
85
|
+
for (const block of blocks) {
|
|
86
|
+
writer.setAttribute(ALIGNMENT, alignment, block);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
* @module alignment/alignmentconfig
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The configuration of the {@link module:alignment/alignment~Alignment alignment feature}.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* ClassicEditor
|
|
13
|
+
* .create( editorElement, {
|
|
14
|
+
* alignment: {
|
|
15
|
+
* options: [ 'left', 'right' ]
|
|
16
|
+
* }
|
|
17
|
+
* } )
|
|
18
|
+
* .then( ... )
|
|
19
|
+
* .catch( ... );
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
|
|
23
|
+
*/
|
|
24
|
+
export interface AlignmentConfig {
|
|
25
|
+
options?: Array<SupportedOption | AlignmentFormat>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Available alignment options.
|
|
29
|
+
*
|
|
30
|
+
* The available options are: `'left'`, `'right'`, `'center'` and `'justify'`. Other values are ignored.
|
|
31
|
+
*
|
|
32
|
+
* **Note:** It is recommended to always use `'left'` or `'right'` as these are default values which the user should
|
|
33
|
+
* normally be able to choose depending on the
|
|
34
|
+
* {@glink getting-started/setup/ui-language#setting-the-language-of-the-content language of the editor content}.
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* ClassicEditor
|
|
38
|
+
* .create( editorElement, {
|
|
39
|
+
* alignment: {
|
|
40
|
+
* options: [ 'left', 'right' ]
|
|
41
|
+
* }
|
|
42
|
+
* } )
|
|
43
|
+
* .then( ... )
|
|
44
|
+
* .catch( ... );
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* By default the alignment is set inline using the `text-align` CSS property. To further customize the alignment,
|
|
48
|
+
* you can provide names of classes for each alignment option using the `className` property.
|
|
49
|
+
*
|
|
50
|
+
* **Note:** Once you define the `className` property for one option, you need to specify it for all other options.
|
|
51
|
+
*
|
|
52
|
+
* ```ts
|
|
53
|
+
* ClassicEditor
|
|
54
|
+
* .create( editorElement, {
|
|
55
|
+
* alignment: {
|
|
56
|
+
* options: [
|
|
57
|
+
* { name: 'left', className: 'my-align-left' },
|
|
58
|
+
* { name: 'right', className: 'my-align-right' }
|
|
59
|
+
* ]
|
|
60
|
+
* }
|
|
61
|
+
* } )
|
|
62
|
+
* .then( ... )
|
|
63
|
+
* .catch( ... );
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* See the demo of {@glink features/text-alignment#configuring-alignment-options custom alignment options}.
|
|
67
|
+
*/
|
|
68
|
+
export type AlignmentFormat = {
|
|
69
|
+
name: SupportedOption;
|
|
70
|
+
className?: string;
|
|
71
|
+
};
|
|
72
|
+
export type SupportedOption = 'left' | 'right' | 'center' | 'justify';
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
* @module alignment/alignmentediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds
|
|
11
|
+
* the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.
|
|
12
|
+
*/
|
|
13
|
+
export default class AlignmentEditing extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get pluginName(): "AlignmentEditing";
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get isOfficialPlugin(): true;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
constructor(editor: Editor);
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
init(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
+
* @module alignment/alignmentediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import AlignmentCommand from './alignmentcommand.js';
|
|
10
|
+
import { isDefault, isSupported, normalizeAlignmentOptions, supportedOptions } from './utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds
|
|
13
|
+
* the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.
|
|
14
|
+
*/
|
|
15
|
+
export default class AlignmentEditing extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName() {
|
|
20
|
+
return 'AlignmentEditing';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get isOfficialPlugin() {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
constructor(editor) {
|
|
32
|
+
super(editor);
|
|
33
|
+
editor.config.define('alignment', {
|
|
34
|
+
options: supportedOptions.map(option => ({ name: option }))
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
init() {
|
|
41
|
+
const editor = this.editor;
|
|
42
|
+
const locale = editor.locale;
|
|
43
|
+
const schema = editor.model.schema;
|
|
44
|
+
const options = normalizeAlignmentOptions(editor.config.get('alignment.options'));
|
|
45
|
+
// Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode.
|
|
46
|
+
const optionsToConvert = options.filter(option => isSupported(option.name) && !isDefault(option.name, locale));
|
|
47
|
+
// Once there is at least one `className` defined, we switch to alignment with classes.
|
|
48
|
+
const shouldUseClasses = optionsToConvert.some(option => !!option.className);
|
|
49
|
+
// Allow alignment attribute on all blocks.
|
|
50
|
+
schema.extend('$block', { allowAttributes: 'alignment' });
|
|
51
|
+
editor.model.schema.setAttributeProperties('alignment', { isFormatting: true });
|
|
52
|
+
if (shouldUseClasses) {
|
|
53
|
+
editor.conversion.attributeToAttribute(buildClassDefinition(optionsToConvert));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
// Downcast inline styles.
|
|
57
|
+
editor.conversion.for('downcast').attributeToAttribute(buildDowncastInlineDefinition(optionsToConvert));
|
|
58
|
+
}
|
|
59
|
+
const upcastInlineDefinitions = buildUpcastInlineDefinitions(optionsToConvert);
|
|
60
|
+
// Always upcast from inline styles.
|
|
61
|
+
for (const definition of upcastInlineDefinitions) {
|
|
62
|
+
editor.conversion.for('upcast').attributeToAttribute(definition);
|
|
63
|
+
}
|
|
64
|
+
const upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions(optionsToConvert);
|
|
65
|
+
// Always upcast from deprecated `align` attribute.
|
|
66
|
+
for (const definition of upcastCompatibilityDefinitions) {
|
|
67
|
+
editor.conversion.for('upcast').attributeToAttribute(definition);
|
|
68
|
+
}
|
|
69
|
+
editor.commands.add('alignment', new AlignmentCommand(editor));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Prepare downcast conversion definition for inline alignment styling.
|
|
74
|
+
*/
|
|
75
|
+
function buildDowncastInlineDefinition(options) {
|
|
76
|
+
const view = {};
|
|
77
|
+
for (const { name } of options) {
|
|
78
|
+
view[name] = {
|
|
79
|
+
key: 'style',
|
|
80
|
+
value: {
|
|
81
|
+
'text-align': name
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const definition = {
|
|
86
|
+
model: {
|
|
87
|
+
key: 'alignment',
|
|
88
|
+
values: options.map(option => option.name)
|
|
89
|
+
},
|
|
90
|
+
view
|
|
91
|
+
};
|
|
92
|
+
return definition;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Prepare upcast definitions for inline alignment styles.
|
|
96
|
+
*/
|
|
97
|
+
function buildUpcastInlineDefinitions(options) {
|
|
98
|
+
const definitions = [];
|
|
99
|
+
for (const { name } of options) {
|
|
100
|
+
definitions.push({
|
|
101
|
+
view: {
|
|
102
|
+
key: 'style',
|
|
103
|
+
value: {
|
|
104
|
+
'text-align': name
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
model: {
|
|
108
|
+
key: 'alignment',
|
|
109
|
+
value: name
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return definitions;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Prepare upcast definitions for deprecated `align` attribute.
|
|
117
|
+
*/
|
|
118
|
+
function buildUpcastCompatibilityDefinitions(options) {
|
|
119
|
+
const definitions = [];
|
|
120
|
+
for (const { name } of options) {
|
|
121
|
+
definitions.push({
|
|
122
|
+
view: {
|
|
123
|
+
key: 'align',
|
|
124
|
+
value: name
|
|
125
|
+
},
|
|
126
|
+
model: {
|
|
127
|
+
key: 'alignment',
|
|
128
|
+
value: name
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return definitions;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Prepare conversion definitions for upcast and downcast alignment with classes.
|
|
136
|
+
*/
|
|
137
|
+
function buildClassDefinition(options) {
|
|
138
|
+
const view = {};
|
|
139
|
+
for (const option of options) {
|
|
140
|
+
view[option.name] = {
|
|
141
|
+
key: 'class',
|
|
142
|
+
value: option.className
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const definition = {
|
|
146
|
+
model: {
|
|
147
|
+
key: 'alignment',
|
|
148
|
+
values: options.map(option => option.name)
|
|
149
|
+
},
|
|
150
|
+
view
|
|
151
|
+
};
|
|
152
|
+
return definition;
|
|
153
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
* @module alignment/alignmentui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import type { SupportedOption } from './alignmentconfig.js';
|
|
10
|
+
/**
|
|
11
|
+
* The default alignment UI plugin.
|
|
12
|
+
*
|
|
13
|
+
* It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons
|
|
14
|
+
* and the `'alignment'` dropdown.
|
|
15
|
+
*/
|
|
16
|
+
export default class AlignmentUI extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* Returns the localized option titles provided by the plugin.
|
|
19
|
+
*
|
|
20
|
+
* The following localized titles corresponding with
|
|
21
|
+
* {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:
|
|
22
|
+
*
|
|
23
|
+
* * `'left'`,
|
|
24
|
+
* * `'right'`,
|
|
25
|
+
* * `'center'`,
|
|
26
|
+
* * `'justify'`.
|
|
27
|
+
*
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
get localizedOptionTitles(): Record<SupportedOption, string>;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get pluginName(): "AlignmentUI";
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
static get isOfficialPlugin(): true;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
init(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Helper method for initializing the button and linking it with an appropriate command.
|
|
45
|
+
*
|
|
46
|
+
* @param option The name of the alignment option for which the button is added.
|
|
47
|
+
*/
|
|
48
|
+
private _addButton;
|
|
49
|
+
/**
|
|
50
|
+
* Helper method for creating the button view element.
|
|
51
|
+
*
|
|
52
|
+
* @param locale Editor locale.
|
|
53
|
+
* @param option The name of the alignment option for which the button is added.
|
|
54
|
+
* @param buttonAttrs Optional parameters passed to button view instance.
|
|
55
|
+
*/
|
|
56
|
+
private _createButton;
|
|
57
|
+
/**
|
|
58
|
+
* Helper method for initializing the toolnar dropdown and linking it with an appropriate command.
|
|
59
|
+
*
|
|
60
|
+
* @param option The name of the alignment option for which the button is added.
|
|
61
|
+
*/
|
|
62
|
+
private _addToolbarDropdown;
|
|
63
|
+
/**
|
|
64
|
+
* Creates a menu for all alignment options to use either in menu bar.
|
|
65
|
+
*
|
|
66
|
+
* @param options Normalized alignment options from config.
|
|
67
|
+
*/
|
|
68
|
+
private _addMenuBarMenu;
|
|
69
|
+
}
|