@ckeditor/ckeditor5-alignment 34.0.0 → 35.0.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 +162 -0
- package/LICENSE.md +2 -2
- package/build/alignment.js +1 -1
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/ms.js +1 -0
- package/build/translations/pt.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -0
- package/build/translations/ur.js +1 -0
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/bg.po +41 -0
- package/lang/translations/bn.po +41 -0
- package/lang/translations/ca.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/ms.po +41 -0
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +2 -2
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +41 -0
- package/lang/translations/ur.po +41 -0
- package/package.json +15 -14
- package/src/alignmentui.js +7 -1
- package/build/alignment.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Changelog
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
|
|
5
|
+
|
|
6
|
+
Changes for the past releases are available below.
|
|
7
|
+
|
|
8
|
+
## [19.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v18.0.0...v19.0.0) (2020-04-29)
|
|
9
|
+
|
|
10
|
+
Internal changes only (updated dependencies, documentation, etc.).
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [18.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v17.0.0...v18.0.0) (2020-03-19)
|
|
14
|
+
|
|
15
|
+
### Other changes
|
|
16
|
+
|
|
17
|
+
* Updated translations. ([f1beaaa](https://github.com/ckeditor/ckeditor5-alignment/commit/f1beaaa))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [17.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v16.0.0...v17.0.0) (2020-02-18)
|
|
21
|
+
|
|
22
|
+
### MAJOR BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* The `align-left`, `align-right`, `align-center`, and `align-justify` icons have been moved to `@ckeditor/ckeditor5-core`.
|
|
25
|
+
|
|
26
|
+
### Other changes
|
|
27
|
+
|
|
28
|
+
* Moved alignment icons to `@ckeditor/ckeditor5-core` (see [ckeditor/ckeditor5-table#227](https://github.com/ckeditor/ckeditor5-table/issues/227)). ([410e279](https://github.com/ckeditor/ckeditor5-alignment/commit/410e279))
|
|
29
|
+
* Updated translations. ([288672f](https://github.com/ckeditor/ckeditor5-alignment/commit/288672f))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [16.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v15.0.0...v16.0.0) (2019-12-04)
|
|
33
|
+
|
|
34
|
+
### Other changes
|
|
35
|
+
|
|
36
|
+
* Updated translations. ([9085f7b](https://github.com/ckeditor/ckeditor5-alignment/commit/9085f7b))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [15.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v11.2.0...v15.0.0) (2019-10-23)
|
|
40
|
+
|
|
41
|
+
### Other changes
|
|
42
|
+
|
|
43
|
+
* Updated translations. ([a719974](https://github.com/ckeditor/ckeditor5-alignment/commit/a719974)) ([2fed077](https://github.com/ckeditor/ckeditor5-alignment/commit/2fed077))
|
|
44
|
+
* Added `pluginName` to the editor plugin part of the feature. ([3b42798](https://github.com/ckeditor/ckeditor5-alignment/commit/3b42798))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## [11.2.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v11.1.3...v11.2.0) (2019-08-26)
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
* Integrated the text alignment feature with different editor content directions (LTR and RTL). See [ckeditor/ckeditor5#1151](https://github.com/ckeditor/ckeditor5/issues/1151). ([edc7d8b](https://github.com/ckeditor/ckeditor5-alignment/commit/edc7d8b))
|
|
52
|
+
|
|
53
|
+
### Bug fixes
|
|
54
|
+
|
|
55
|
+
* The UI buttons should be marked as toggleable for better assistive technologies support (see [ckeditor/ckeditor5#1403](https://github.com/ckeditor/ckeditor5/issues/1403)). ([599ea01](https://github.com/ckeditor/ckeditor5-alignment/commit/599ea01))
|
|
56
|
+
|
|
57
|
+
### Other changes
|
|
58
|
+
|
|
59
|
+
* The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([54f81b3](https://github.com/ckeditor/ckeditor5-alignment/commit/54f81b3))
|
|
60
|
+
* The text alignment toolbar should have a proper `aria-label` attribute (see [ckeditor/ckeditor5#1404](https://github.com/ckeditor/ckeditor5/issues/1404)). ([3ed81de](https://github.com/ckeditor/ckeditor5-alignment/commit/3ed81de))
|
|
61
|
+
* Updated translations. ([feb4ab3](https://github.com/ckeditor/ckeditor5-alignment/commit/feb4ab3))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [11.1.3](https://github.com/ckeditor/ckeditor5-alignment/compare/v11.1.2...v11.1.3) (2019-07-10)
|
|
65
|
+
|
|
66
|
+
Internal changes only (updated dependencies, documentation, etc.).
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## [11.1.2](https://github.com/ckeditor/ckeditor5-alignment/compare/v11.1.1...v11.1.2) (2019-07-04)
|
|
70
|
+
|
|
71
|
+
### Other changes
|
|
72
|
+
|
|
73
|
+
* Updated translations. ([bb7f494](https://github.com/ckeditor/ckeditor5-alignment/commit/bb7f494))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## [11.1.1](https://github.com/ckeditor/ckeditor5-alignment/compare/v11.1.0...v11.1.1) (2019-06-05)
|
|
77
|
+
|
|
78
|
+
### Other changes
|
|
79
|
+
|
|
80
|
+
* Updated translations. ([32c32c1](https://github.com/ckeditor/ckeditor5-alignment/commit/32c32c1))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## [11.1.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v11.0.0...v11.1.0) (2019-04-10)
|
|
84
|
+
|
|
85
|
+
### Features
|
|
86
|
+
|
|
87
|
+
* Marked alignment as a formatting attribute using the `AttributeProperties#isFormatting` property. Closes [ckeditor/ckeditor5#1664](https://github.com/ckeditor/ckeditor5/issues/1664). ([6358e08](https://github.com/ckeditor/ckeditor5-alignment/commit/6358e08))
|
|
88
|
+
|
|
89
|
+
### Other changes
|
|
90
|
+
|
|
91
|
+
* Updated translations. ([78bfc40](https://github.com/ckeditor/ckeditor5-alignment/commit/78bfc40))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [11.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v10.0.4...v11.0.0) (2019-02-28)
|
|
95
|
+
|
|
96
|
+
### Other changes
|
|
97
|
+
|
|
98
|
+
* Updated translations. ([45e8dd5](https://github.com/ckeditor/ckeditor5-alignment/commit/45e8dd5)) ([a92c37b](https://github.com/ckeditor/ckeditor5-alignment/commit/a92c37b)) ([ef68e54](https://github.com/ckeditor/ckeditor5-alignment/commit/ef68e54))
|
|
99
|
+
|
|
100
|
+
### BREAKING CHANGES
|
|
101
|
+
|
|
102
|
+
* Upgraded minimal versions of Node to `8.0.0` and npm to `5.7.1`. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([612ea3c](https://github.com/ckeditor/ckeditor5-cloud-services/commit/612ea3c))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## [10.0.4](https://github.com/ckeditor/ckeditor5-alignment/compare/v10.0.3...v10.0.4) (2018-12-05)
|
|
106
|
+
|
|
107
|
+
### Other changes
|
|
108
|
+
|
|
109
|
+
* Improved SVG icons size. See [ckeditor/ckeditor5-theme-lark#206](https://github.com/ckeditor/ckeditor5-theme-lark/issues/206). ([1d71d33](https://github.com/ckeditor/ckeditor5-alignment/commit/1d71d33))
|
|
110
|
+
* Updated translations. ([547f8d8](https://github.com/ckeditor/ckeditor5-alignment/commit/547f8d8)) ([43d8225](https://github.com/ckeditor/ckeditor5-alignment/commit/43d8225))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## [10.0.3](https://github.com/ckeditor/ckeditor5-alignment/compare/v10.0.2...v10.0.3) (2018-10-08)
|
|
114
|
+
|
|
115
|
+
### Other changes
|
|
116
|
+
|
|
117
|
+
* Updated translations. ([5b30202](https://github.com/ckeditor/ckeditor5-alignment/commit/5b30202))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## [10.0.2](https://github.com/ckeditor/ckeditor5-alignment/compare/v10.0.1...v10.0.2) (2018-07-18)
|
|
121
|
+
|
|
122
|
+
### Other changes
|
|
123
|
+
|
|
124
|
+
* Updated translations. ([33c281c](https://github.com/ckeditor/ckeditor5-alignment/commit/33c281c))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## [10.0.1](https://github.com/ckeditor/ckeditor5-alignment/compare/v10.0.0...v10.0.1) (2018-06-21)
|
|
128
|
+
|
|
129
|
+
### Other changes
|
|
130
|
+
|
|
131
|
+
* Updated translations.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## [10.0.0](https://github.com/ckeditor/ckeditor5-alignment/compare/v1.0.0-beta.4...v10.0.0) (2018-04-25)
|
|
135
|
+
|
|
136
|
+
### Other changes
|
|
137
|
+
|
|
138
|
+
* Changed the license to GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991). ([eed1029](https://github.com/ckeditor/ckeditor5-alignment/commit/eed1029))
|
|
139
|
+
* Updated translations. ([baa1fbe](https://github.com/ckeditor/ckeditor5-alignment/commit/baa1fbe))
|
|
140
|
+
|
|
141
|
+
### BREAKING CHANGES
|
|
142
|
+
|
|
143
|
+
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-alignment/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018-04-19)
|
|
147
|
+
|
|
148
|
+
### Other changes
|
|
149
|
+
|
|
150
|
+
* Updated translations. ([586ae62](https://github.com/ckeditor/ckeditor5-alignment/commit/586ae62))
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-alignment/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018-04-10)
|
|
154
|
+
|
|
155
|
+
Internal changes only (updated dependencies, documentation, etc.).
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-alignment/compare/v0.0.1...v1.0.0-beta.1) (2018-03-15)
|
|
159
|
+
|
|
160
|
+
### Features
|
|
161
|
+
|
|
162
|
+
* Initial implementation. Closes [#2](https://github.com/ckeditor/ckeditor5-alignment/issues/2).
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 text alignment feature** – https://github.com/ckeditor/ckeditor5-alignment <br>
|
|
5
|
-
Copyright (c) 2003-2022, [CKSource
|
|
5
|
+
Copyright (c) 2003-2022, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
|
8
8
|
|
|
@@ -14,4 +14,4 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi
|
|
|
14
14
|
Trademarks
|
|
15
15
|
----------
|
|
16
16
|
|
|
17
|
-
**CKEditor** is a trademark of [CKSource
|
|
17
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
package/build/alignment.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={704:(t,e,n)=>{t.exports=n(79)("./src/core.js")},273:(t,e,n)=>{t.exports=n(79)("./src/ui.js")},209:(t,e,n)=>{t.exports=n(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Alignment:()=>f,AlignmentEditing:()=>g,AlignmentUI:()=>d});var t=n(704),e=n(209);const o=["left","right","center","justify"];function r(t){return o.includes(t)}function a(t,e){return"rtl"==e.contentLanguageDirection?"right"===t:"left"===t}function s(t){const n=t.map((t=>{let e;return e="string"==typeof t?{name:t}:t,e})).filter((t=>{const n=!!o.includes(t.name);return n||(0,e.logWarning)("alignment-config-name-not-recognized",{option:t}),n})),i=n.filter((t=>!!t.className)).length;if(i&&i<n.length)throw new e.CKEditorError("alignment-config-classnames-are-missing",{configuredOptions:t});return n.forEach(((n,i,o)=>{const r=o.slice(i+1);if(r.some((t=>t.name==n.name)))throw new e.CKEditorError("alignment-config-name-already-defined",{option:n,configuredOptions:t});if(n.className){if(r.some((t=>t.className==n.className)))throw new e.CKEditorError("alignment-config-classname-already-defined",{option:n,configuredOptions:t})}})),n}const l="alignment";class c extends t.Command{refresh(){const t=this.editor.locale,n=(0,e.first)(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!n&&this._canBeAligned(n),this.isEnabled&&n.hasAttribute("alignment")?this.value=n.getAttribute("alignment"):this.value="rtl"===t.contentLanguageDirection?"right":"left"}execute(t={}){const e=this.editor,n=e.locale,i=e.model,o=i.document,r=t.value;i.change((t=>{const e=Array.from(o.selection.getSelectedBlocks()).filter((t=>this._canBeAligned(t))),i=e[0].getAttribute("alignment");a(r,n)||i===r||!r?function(t,e){for(const n of t)e.removeAttribute(l,n)}(e,t):function(t,e,n){for(const i of t)e.setAttribute(l,n,i)}(e,t,r)}))}_canBeAligned(t){return this.editor.model.schema.checkAttribute(t,l)}}class g extends t.Plugin{static get pluginName(){return"AlignmentEditing"}constructor(t){super(t),t.config.define("alignment",{options:[...o.map((t=>({name:t})))]})}init(){const t=this.editor,e=t.locale,n=t.model.schema,i=s(t.config.get("alignment.options")).filter((t=>r(t.name)&&!a(t.name,e))),o=i.some((t=>!!t.className));n.extend("$block",{allowAttributes:"alignment"}),t.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),o?t.conversion.attributeToAttribute(function(t){const e={model:{key:"alignment",values:t.map((t=>t.name))},view:{}};for(const n of t)e.view[n.name]={key:"class",value:n.className};return e}(i)):t.conversion.for("downcast").attributeToAttribute(function(t){const e={model:{key:"alignment",values:t.map((t=>t.name))},view:{}};for(const{name:n}of t)e.view[n]={key:"style",value:{"text-align":n}};return e}(i));const l=function(t){const e=[];for(const{name:n}of t)e.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return e}(i);for(const e of l)t.conversion.for("upcast").attributeToAttribute(e);const g=function(t){const e=[];for(const{name:n}of t)e.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return e}(i);for(const e of g)t.conversion.for("upcast").attributeToAttribute(e);t.commands.add("alignment",new c(t))}}var u=n(273);const m=new Map([["left",t.icons.alignLeft],["right",t.icons.alignRight],["center",t.icons.alignCenter],["justify",t.icons.alignJustify]]);class d extends t.Plugin{get localizedOptionTitles(){const t=this.editor.t;return{left:t("Align left"),right:t("Align right"),center:t("Align center"),justify:t("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const t=this.editor,e=t.ui.componentFactory,n=t.t,i=s(t.config.get("alignment.options"));i.map((t=>t.name)).filter(r).forEach((t=>this._addButton(t))),e.add("alignment",(
|
|
5
|
+
*/(()=>{var t={704:(t,e,n)=>{t.exports=n(79)("./src/core.js")},273:(t,e,n)=>{t.exports=n(79)("./src/ui.js")},209:(t,e,n)=>{t.exports=n(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Alignment:()=>f,AlignmentEditing:()=>g,AlignmentUI:()=>d});var t=n(704),e=n(209);const o=["left","right","center","justify"];function r(t){return o.includes(t)}function a(t,e){return"rtl"==e.contentLanguageDirection?"right"===t:"left"===t}function s(t){const n=t.map((t=>{let e;return e="string"==typeof t?{name:t}:t,e})).filter((t=>{const n=!!o.includes(t.name);return n||(0,e.logWarning)("alignment-config-name-not-recognized",{option:t}),n})),i=n.filter((t=>!!t.className)).length;if(i&&i<n.length)throw new e.CKEditorError("alignment-config-classnames-are-missing",{configuredOptions:t});return n.forEach(((n,i,o)=>{const r=o.slice(i+1);if(r.some((t=>t.name==n.name)))throw new e.CKEditorError("alignment-config-name-already-defined",{option:n,configuredOptions:t});if(n.className){if(r.some((t=>t.className==n.className)))throw new e.CKEditorError("alignment-config-classname-already-defined",{option:n,configuredOptions:t})}})),n}const l="alignment";class c extends t.Command{refresh(){const t=this.editor.locale,n=(0,e.first)(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!n&&this._canBeAligned(n),this.isEnabled&&n.hasAttribute("alignment")?this.value=n.getAttribute("alignment"):this.value="rtl"===t.contentLanguageDirection?"right":"left"}execute(t={}){const e=this.editor,n=e.locale,i=e.model,o=i.document,r=t.value;i.change((t=>{const e=Array.from(o.selection.getSelectedBlocks()).filter((t=>this._canBeAligned(t))),i=e[0].getAttribute("alignment");a(r,n)||i===r||!r?function(t,e){for(const n of t)e.removeAttribute(l,n)}(e,t):function(t,e,n){for(const i of t)e.setAttribute(l,n,i)}(e,t,r)}))}_canBeAligned(t){return this.editor.model.schema.checkAttribute(t,l)}}class g extends t.Plugin{static get pluginName(){return"AlignmentEditing"}constructor(t){super(t),t.config.define("alignment",{options:[...o.map((t=>({name:t})))]})}init(){const t=this.editor,e=t.locale,n=t.model.schema,i=s(t.config.get("alignment.options")).filter((t=>r(t.name)&&!a(t.name,e))),o=i.some((t=>!!t.className));n.extend("$block",{allowAttributes:"alignment"}),t.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),o?t.conversion.attributeToAttribute(function(t){const e={model:{key:"alignment",values:t.map((t=>t.name))},view:{}};for(const n of t)e.view[n.name]={key:"class",value:n.className};return e}(i)):t.conversion.for("downcast").attributeToAttribute(function(t){const e={model:{key:"alignment",values:t.map((t=>t.name))},view:{}};for(const{name:n}of t)e.view[n]={key:"style",value:{"text-align":n}};return e}(i));const l=function(t){const e=[];for(const{name:n}of t)e.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return e}(i);for(const e of l)t.conversion.for("upcast").attributeToAttribute(e);const g=function(t){const e=[];for(const{name:n}of t)e.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return e}(i);for(const e of g)t.conversion.for("upcast").attributeToAttribute(e);t.commands.add("alignment",new c(t))}}var u=n(273);const m=new Map([["left",t.icons.alignLeft],["right",t.icons.alignRight],["center",t.icons.alignCenter],["justify",t.icons.alignJustify]]);class d extends t.Plugin{get localizedOptionTitles(){const t=this.editor.t;return{left:t("Align left"),right:t("Align right"),center:t("Align center"),justify:t("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const t=this.editor,e=t.ui.componentFactory,n=t.t,i=s(t.config.get("alignment.options"));i.map((t=>t.name)).filter(r).forEach((t=>this._addButton(t))),e.add("alignment",(o=>{const r=(0,u.createDropdown)(o),a=i.map((t=>e.create(`alignment:${t.name}`)));(0,u.addToolbarToDropdown)(r,a,{enableActiveItemFocusOnDropdownOpen:!0}),r.buttonView.set({label:n("Text alignment"),tooltip:!0}),r.toolbarView.isVertical=!0,r.toolbarView.ariaLabel=n("Text alignment toolbar"),r.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===o.contentLanguageDirection?m.get("right"):m.get("left");return r.buttonView.bind("icon").toMany(a,"isOn",((...t)=>{const e=t.findIndex((t=>t));return e<0?s:a[e].icon})),r.bind("isEnabled").toMany(a,"isEnabled",((...t)=>t.some((t=>t)))),this.listenTo(r,"execute",(()=>{t.editing.view.focus()})),r}))}_addButton(t){const e=this.editor;e.ui.componentFactory.add(`alignment:${t}`,(n=>{const i=e.commands.get("alignment"),o=new u.ButtonView(n);return o.set({label:this.localizedOptionTitles[t],icon:m.get(t),tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value",(e=>e===t)),this.listenTo(o,"execute",(()=>{e.execute("alignment",{value:t}),e.editing.view.focus()})),o}))}}class f extends t.Plugin{static get requires(){return[g,d]}static get pluginName(){return"Alignment"}}})(),(window.CKEditor5=window.CKEditor5||{}).alignment=i})();
|
package/build/translations/af.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(n){const
|
|
1
|
+
!function(n){const e=n.af=n.af||{};e.dictionary=Object.assign(e.dictionary||{},{"Align center":"Belyn in die middel","Align left":"Belyn links","Align right":"Belyn regs",Justify:"Belyn beide kante","Text alignment":"Teksbelyning","Text alignment toolbar":"Teksbelyning nutsbank"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/ar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(n){const i=n.ar=n.ar||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"محاذاة في المنتصف","Align left":"محاذاة لليسار","Align right":"محاذاة لليمين",Justify:"ضبط","Text alignment":"محاذاة النص","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(n){const i=n.ar=n.ar||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"محاذاة في المنتصف","Align left":"محاذاة لليسار","Align right":"محاذاة لليمين",Justify:"ضبط","Text alignment":"محاذاة النص","Text alignment toolbar":"شريط أدوات محاذاة النص"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.bg=n.bg||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"Централно подравняване","Align left":"Ляво подравняване","Align right":"Дясно подравняване",Justify:"Разпредели по равно","Text alignment":"Подравняване на текста","Text alignment toolbar":"Лента за подравняване на текст"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.bn=n.bn||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"কেন্দ্র সারিবদ্ধ করুন","Align left":"বামে সারিবদ্ধ করুন","Align right":"ডানদিকে সারিবদ্ধ করুন",Justify:"জাস্টিফাই","Text alignment":"টেক্সট সারিবদ্ধকরণ","Text alignment toolbar":"টেক্সট শ্রেণীবিন্যাস টুলবার"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/ca.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(i){const
|
|
1
|
+
!function(i){const e=i.ca=i.ca||{};e.dictionary=Object.assign(e.dictionary||{},{"Align center":"Alineació centre","Align left":"Alineació esquerra","Align right":"Alineació dreta",Justify:"Justificar","Text alignment":"Alineació text","Text alignment toolbar":"Barra d'eines d'alineació de text"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/fi.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(a){const i=a.fi=a.fi||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"Tasaa keskelle","Align left":"Tasaa vasemmalle","Align right":"Tasaa oikealle",Justify:"Tasaa molemmat reunat","Text alignment":"Tekstin tasaus","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(a){const i=a.fi=a.fi||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"Tasaa keskelle","Align left":"Tasaa vasemmalle","Align right":"Tasaa oikealle",Justify:"Tasaa molemmat reunat","Text alignment":"Tekstin tasaus","Text alignment toolbar":"Tekstin suuntauksen työkalupalkki"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/lt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(i){const t=i.lt=i.lt||{};t.dictionary=Object.assign(t.dictionary||{},{"Align center":"Centruoti","Align left":"Lygiuoti į kairę","Align right":"Lygiuoti į dešinę",Justify:"Lygiuoti per visą plotį","Text alignment":"Teksto lygiavimas","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
1
|
+
!function(i){const t=i.lt=i.lt||{};t.dictionary=Object.assign(t.dictionary||{},{"Align center":"Centruoti","Align left":"Lygiuoti į kairę","Align right":"Lygiuoti į dešinę",Justify:"Lygiuoti per visą plotį","Text alignment":"Teksto lygiavimas","Text alignment toolbar":"Teksto lygiavimo įrankių juosta"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const n=a.ms=a.ms||{};n.dictionary=Object.assign(n.dictionary||{},{"Align center":"Jajarkan tengah","Align left":"Jajarkan kiri","Align right":"Jajarkan kiri",Justify:"Imbang","Text alignment":"Jajaran teks","Text alignment toolbar":"Bar alat capaian jajaran teks"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/pt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){const
|
|
1
|
+
!function(t){const i=t.pt=t.pt||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"Alinhar ao centro","Align left":"Alinhar à esquerda","Align right":"Alinhar à direita",Justify:"Justificar","Text alignment":"Alinhamento de texto","Text alignment toolbar":"Barra de alinhamento de texto"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/build/translations/sv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){const
|
|
1
|
+
!function(t){const e=t.sv=t.sv||{};e.dictionary=Object.assign(e.dictionary||{},{"Align center":"Centrera","Align left":"Vänsterjustera","Align right":"Högerjustera",Justify:"Justera till marginaler","Text alignment":"Textjustering","Text alignment toolbar":"Verktygsfält för textjustering"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const t=n.th=n.th||{};t.dictionary=Object.assign(t.dictionary||{},{"Align center":"จัดกึ่งกลาง","Align left":"จัดชิดซ้าย","Align right":"จัดชิดขวา",Justify:"จัด(ขอบ)","Text alignment":"จัดตำแหน่งข้อความ","Text alignment toolbar":"แถบเครื่องมือจัดตำแหน่งข้อความ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const i=n.ur=n.ur||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"درمیانی سیدھ","Align left":"بائیں سیدھ","Align right":"دائیں سیدھ",Justify:"برابر سیدھ","Text alignment":"متن کی سیدھ","Text alignment toolbar":"خانہ آلات برائے سیدھ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/lang/translations/af.po
CHANGED
package/lang/translations/ar.po
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, 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: Bulgarian (https://www.transifex.com/ckeditor/teams/11143/bg/)\n"
|
|
16
|
+
"Language: bg\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
|
+
msgid "Align left"
|
|
21
|
+
msgstr "Ляво подравняване"
|
|
22
|
+
|
|
23
|
+
msgctxt "Toolbar button tooltip for aligning the text to the right."
|
|
24
|
+
msgid "Align right"
|
|
25
|
+
msgstr "Дясно подравняване"
|
|
26
|
+
|
|
27
|
+
msgctxt "Toolbar button tooltip for aligning the text to center."
|
|
28
|
+
msgid "Align center"
|
|
29
|
+
msgstr "Централно подравняване"
|
|
30
|
+
|
|
31
|
+
msgctxt "Toolbar button tooltip for making the text justified."
|
|
32
|
+
msgid "Justify"
|
|
33
|
+
msgstr "Разпредели по равно"
|
|
34
|
+
|
|
35
|
+
msgctxt "Dropdown button tooltip for the text alignment feature."
|
|
36
|
+
msgid "Text alignment"
|
|
37
|
+
msgstr "Подравняване на текста"
|
|
38
|
+
|
|
39
|
+
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
40
|
+
msgid "Text alignment toolbar"
|
|
41
|
+
msgstr "Лента за подравняване на текст"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, 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: Bengali (https://www.transifex.com/ckeditor/teams/11143/bn/)\n"
|
|
16
|
+
"Language: bn\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
|
+
msgid "Align left"
|
|
21
|
+
msgstr "বামে সারিবদ্ধ করুন"
|
|
22
|
+
|
|
23
|
+
msgctxt "Toolbar button tooltip for aligning the text to the right."
|
|
24
|
+
msgid "Align right"
|
|
25
|
+
msgstr "ডানদিকে সারিবদ্ধ করুন"
|
|
26
|
+
|
|
27
|
+
msgctxt "Toolbar button tooltip for aligning the text to center."
|
|
28
|
+
msgid "Align center"
|
|
29
|
+
msgstr "কেন্দ্র সারিবদ্ধ করুন"
|
|
30
|
+
|
|
31
|
+
msgctxt "Toolbar button tooltip for making the text justified."
|
|
32
|
+
msgid "Justify"
|
|
33
|
+
msgstr "জাস্টিফাই"
|
|
34
|
+
|
|
35
|
+
msgctxt "Dropdown button tooltip for the text alignment feature."
|
|
36
|
+
msgid "Text alignment"
|
|
37
|
+
msgstr "টেক্সট সারিবদ্ধকরণ"
|
|
38
|
+
|
|
39
|
+
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
40
|
+
msgid "Text alignment toolbar"
|
|
41
|
+
msgstr "টেক্সট শ্রেণীবিন্যাস টুলবার"
|
package/lang/translations/ca.po
CHANGED
package/lang/translations/es.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Spanish (https://www.transifex.com/ckeditor/teams/11143/es/)\n"
|
|
16
16
|
"Language: es\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
|
18
18
|
|
|
19
19
|
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
20
|
msgid "Align left"
|
package/lang/translations/fi.po
CHANGED
package/lang/translations/fr.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: French (https://www.transifex.com/ckeditor/teams/11143/fr/)\n"
|
|
16
16
|
"Language: fr\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
|
18
18
|
|
|
19
19
|
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
20
|
msgid "Align left"
|
package/lang/translations/it.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Italian (https://www.transifex.com/ckeditor/teams/11143/it/)\n"
|
|
16
16
|
"Language: it\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
|
18
18
|
|
|
19
19
|
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
20
|
msgid "Align left"
|
package/lang/translations/lt.po
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, 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: Malay (https://www.transifex.com/ckeditor/teams/11143/ms/)\n"
|
|
16
|
+
"Language: ms\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
|
+
msgid "Align left"
|
|
21
|
+
msgstr "Jajarkan kiri"
|
|
22
|
+
|
|
23
|
+
msgctxt "Toolbar button tooltip for aligning the text to the right."
|
|
24
|
+
msgid "Align right"
|
|
25
|
+
msgstr "Jajarkan kiri"
|
|
26
|
+
|
|
27
|
+
msgctxt "Toolbar button tooltip for aligning the text to center."
|
|
28
|
+
msgid "Align center"
|
|
29
|
+
msgstr "Jajarkan tengah"
|
|
30
|
+
|
|
31
|
+
msgctxt "Toolbar button tooltip for making the text justified."
|
|
32
|
+
msgid "Justify"
|
|
33
|
+
msgstr "Imbang"
|
|
34
|
+
|
|
35
|
+
msgctxt "Dropdown button tooltip for the text alignment feature."
|
|
36
|
+
msgid "Text alignment"
|
|
37
|
+
msgstr "Jajaran teks"
|
|
38
|
+
|
|
39
|
+
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
40
|
+
msgid "Text alignment toolbar"
|
|
41
|
+
msgstr "Bar alat capaian jajaran teks"
|
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/ckeditor/teams/11143/pt_BR/)\n"
|
|
16
16
|
"Language: pt_BR\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
|
18
18
|
|
|
19
19
|
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
20
|
msgid "Align left"
|
package/lang/translations/pt.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Portuguese (https://www.transifex.com/ckeditor/teams/11143/pt/)\n"
|
|
16
16
|
"Language: pt\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
|
|
18
18
|
|
|
19
19
|
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
20
|
msgid "Align left"
|
|
@@ -38,4 +38,4 @@ msgstr "Alinhamento de texto"
|
|
|
38
38
|
|
|
39
39
|
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
40
40
|
msgid "Text alignment toolbar"
|
|
41
|
-
msgstr "
|
|
41
|
+
msgstr "Barra de alinhamento de texto"
|
package/lang/translations/sv.po
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, 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: Thai (https://www.transifex.com/ckeditor/teams/11143/th/)\n"
|
|
16
|
+
"Language: th\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
|
+
msgid "Align left"
|
|
21
|
+
msgstr "จัดชิดซ้าย"
|
|
22
|
+
|
|
23
|
+
msgctxt "Toolbar button tooltip for aligning the text to the right."
|
|
24
|
+
msgid "Align right"
|
|
25
|
+
msgstr "จัดชิดขวา"
|
|
26
|
+
|
|
27
|
+
msgctxt "Toolbar button tooltip for aligning the text to center."
|
|
28
|
+
msgid "Align center"
|
|
29
|
+
msgstr "จัดกึ่งกลาง"
|
|
30
|
+
|
|
31
|
+
msgctxt "Toolbar button tooltip for making the text justified."
|
|
32
|
+
msgid "Justify"
|
|
33
|
+
msgstr "จัด(ขอบ)"
|
|
34
|
+
|
|
35
|
+
msgctxt "Dropdown button tooltip for the text alignment feature."
|
|
36
|
+
msgid "Text alignment"
|
|
37
|
+
msgstr "จัดตำแหน่งข้อความ"
|
|
38
|
+
|
|
39
|
+
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
40
|
+
msgid "Text alignment toolbar"
|
|
41
|
+
msgstr "แถบเครื่องมือจัดตำแหน่งข้อความ"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, 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: Urdu (https://www.transifex.com/ckeditor/teams/11143/ur/)\n"
|
|
16
|
+
"Language: ur\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for aligning the text to the left."
|
|
20
|
+
msgid "Align left"
|
|
21
|
+
msgstr "بائیں سیدھ"
|
|
22
|
+
|
|
23
|
+
msgctxt "Toolbar button tooltip for aligning the text to the right."
|
|
24
|
+
msgid "Align right"
|
|
25
|
+
msgstr "دائیں سیدھ"
|
|
26
|
+
|
|
27
|
+
msgctxt "Toolbar button tooltip for aligning the text to center."
|
|
28
|
+
msgid "Align center"
|
|
29
|
+
msgstr "درمیانی سیدھ"
|
|
30
|
+
|
|
31
|
+
msgctxt "Toolbar button tooltip for making the text justified."
|
|
32
|
+
msgid "Justify"
|
|
33
|
+
msgstr "برابر سیدھ"
|
|
34
|
+
|
|
35
|
+
msgctxt "Dropdown button tooltip for the text alignment feature."
|
|
36
|
+
msgid "Text alignment"
|
|
37
|
+
msgstr "متن کی سیدھ"
|
|
38
|
+
|
|
39
|
+
msgctxt "Label used by assistive technologies describing the text alignment feature toolbar."
|
|
40
|
+
msgid "Text alignment toolbar"
|
|
41
|
+
msgstr "خانہ آلات برائے سیدھ"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-alignment",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "Text alignment feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^
|
|
15
|
+
"ckeditor5": "^35.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
19
|
-
"@ckeditor/ckeditor5-core": "^
|
|
18
|
+
"@ckeditor/ckeditor5-block-quote": "^35.0.0",
|
|
19
|
+
"@ckeditor/ckeditor5-core": "^35.0.0",
|
|
20
20
|
"@ckeditor/ckeditor5-dev-utils": "^30.0.0",
|
|
21
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
22
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
23
|
-
"@ckeditor/ckeditor5-enter": "^
|
|
24
|
-
"@ckeditor/ckeditor5-heading": "^
|
|
25
|
-
"@ckeditor/ckeditor5-image": "^
|
|
26
|
-
"@ckeditor/ckeditor5-list": "^
|
|
27
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
28
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
29
|
-
"@ckeditor/ckeditor5-typing": "^
|
|
21
|
+
"@ckeditor/ckeditor5-editor-classic": "^35.0.0",
|
|
22
|
+
"@ckeditor/ckeditor5-engine": "^35.0.0",
|
|
23
|
+
"@ckeditor/ckeditor5-enter": "^35.0.0",
|
|
24
|
+
"@ckeditor/ckeditor5-heading": "^35.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-image": "^35.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-list": "^35.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-paragraph": "^35.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-theme-lark": "^35.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-typing": "^35.0.0",
|
|
30
30
|
"webpack": "^5.58.1",
|
|
31
31
|
"webpack-cli": "^4.9.0"
|
|
32
32
|
},
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"src",
|
|
49
49
|
"theme",
|
|
50
50
|
"build",
|
|
51
|
-
"ckeditor5-metadata.json"
|
|
51
|
+
"ckeditor5-metadata.json",
|
|
52
|
+
"CHANGELOG.md"
|
|
52
53
|
],
|
|
53
54
|
"scripts": {
|
|
54
55
|
"dll:build": "webpack"
|
package/src/alignmentui.js
CHANGED
|
@@ -79,7 +79,7 @@ export default class AlignmentUI extends Plugin {
|
|
|
79
79
|
|
|
80
80
|
// Add existing alignment buttons to dropdown's toolbar.
|
|
81
81
|
const buttons = options.map( option => componentFactory.create( `alignment:${ option.name }` ) );
|
|
82
|
-
addToolbarToDropdown( dropdownView, buttons );
|
|
82
|
+
addToolbarToDropdown( dropdownView, buttons, { enableActiveItemFocusOnDropdownOpen: true } );
|
|
83
83
|
|
|
84
84
|
// Configure dropdown properties an behavior.
|
|
85
85
|
dropdownView.buttonView.set( {
|
|
@@ -116,6 +116,12 @@ export default class AlignmentUI extends Plugin {
|
|
|
116
116
|
// Enable button if any of the buttons is enabled.
|
|
117
117
|
dropdownView.bind( 'isEnabled' ).toMany( buttons, 'isEnabled', ( ...areEnabled ) => areEnabled.some( isEnabled => isEnabled ) );
|
|
118
118
|
|
|
119
|
+
// Focus the editable after executing the command.
|
|
120
|
+
// Overrides a default behaviour where the focus is moved to the dropdown button (#12125).
|
|
121
|
+
this.listenTo( dropdownView, 'execute', () => {
|
|
122
|
+
editor.editing.view.focus();
|
|
123
|
+
} );
|
|
124
|
+
|
|
119
125
|
return dropdownView;
|
|
120
126
|
} );
|
|
121
127
|
}
|
package/build/alignment.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://CKEditor5.alignment/./src/alignment.js","webpack://CKEditor5.alignment/./src/alignmentcommand.js","webpack://CKEditor5.alignment/./src/alignmentediting.js","webpack://CKEditor5.alignment/./src/alignmentui.js","webpack://CKEditor5.alignment/./src/utils.js","webpack://CKEditor5.alignment/delegated \"./src/core.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.alignment/delegated \"./src/ui.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.alignment/delegated \"./src/utils.js\" from dll-reference CKEditor5.dll","webpack://CKEditor5.alignment/external var \"CKEditor5.dll\"","webpack://CKEditor5.alignment/webpack/bootstrap","webpack://CKEditor5.alignment/webpack/runtime/define property getters","webpack://CKEditor5.alignment/webpack/runtime/hasOwnProperty shorthand","webpack://CKEditor5.alignment/webpack/runtime/make namespace object","webpack://CKEditor5.alignment/./src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEM;AACV;;AAExC;AACA;AACA;AACA,uCAAuC;AACvC,YAAY,kCAAkC;AAC9C;AACA,4CAA4C,0DAA0D;AACtG,IAAI,gDAAgD;AACpD;AACA;AACA;AACe,wBAAwB,sDAAM;AAC7C;AACA;AACA;AACA;AACA,WAAW,yDAAgB,EAAE,oDAAW;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,6DAA6D;AAC1F;AACA,iBAAiB,iDAAiD;AAClE;AACA,YAAY,4CAA4C;AACxD;;AAEA;AACA,6BAA6B,6DAA6D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ,oFAAoF;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+FAA+F;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0CAA0C;AACpD,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,oBAAoB,sFAAsF;AAC1G;AACA,YAAY,kEAAkE;AAC9E;;;;;;;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE6C;AACD;;AAER;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACe,+BAA+B,uDAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,0DAAK;;AAE1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,iDAAS;;AAEpC;AACA;AACA,KAAK;AACL;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,qCAAqC;AACjD,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC7GA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE4C;;AAEM;AAC4C;;AAE9F;AACA,qDAAqD,kEAAkE;AACvH,wDAAwD,4CAA4C;AACpG;AACA;AACe,+BAA+B,sDAAM;AACpD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,wDAAoB,gBAAgB,eAAe;AACpE,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,iEAAyB;;AAE3C;AACA;AACA,aAAa,mDAAW,oBAAoB,iDAAS;AACrD;;AAEA;AACA;;AAEA;AACA,6BAA6B,+BAA+B;AAC5D,6DAA6D,qBAAqB;;AAElF;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,wCAAwC,yDAAgB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,mCAAmC;AACjD;AACA,cAAc,QAAQ;AACtB;AACA;;;;;;;;;;;;;;;;;;;AC3LA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACiC;;AAEnB;;AAEjE;AACA,WAAW,+DAAe;AAC1B,YAAY,gEAAgB;AAC5B,aAAa,iEAAiB;AAC9B,cAAc,kEAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,0BAA0B,sDAAM;AAC/C;AACA;AACA;AACA;AACA,KAAK,0DAA0D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iEAAyB;;AAE3C;AACA;AACA,YAAY,+CAAW;AACvB;;AAEA;AACA,wBAAwB,gEAAc;;AAEtC;AACA,iFAAiF,aAAa;AAC9F,GAAG,sEAAoB;;AAEvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA,gDAAgD,QAAQ;AACxD;AACA,0BAA0B,wDAAU;;AAEpC;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA,KAAK;;AAEL;AACA,IAAI;AACJ;AACA;;;;;;;;;;;;;;;;;;;;AC3JA;AACA;AACA;AACA;;AAEgE;;AAEhE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;;AAEP;AACA,qDAAqD,yDAAyD;AAC9G;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B,YAAY,+CAA+C;AAClG,aAAa;AACb;AACO;AACP;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kEAAkE;AAC7E,aAAa,2DAA2D;AACxE;AACO;AACP;AACA;AACA;;AAEA;AACA,eAAe;AACf,KAAK;AACL;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,IAAI,+DAAU,4CAA4C,SAAS;AACnE;;AAEA;AACA,IAAI;;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kEAAkE;AAC/E;AACA,YAAY,8DAAa,+CAA+C,oBAAoB;AAC5F;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,kEAAkE;AAChF;AACA,aAAa,8DAAa,6CAA6C,4BAA4B;AACnG;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kEAAkE;AACjF;AACA;AACA,cAAc,8DAAa,kDAAkD,4BAA4B;AACzG;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;ACtIA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmD;AACc;AACV","file":"alignment.js","sourcesContent":["/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignment\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport AlignmentEditing from './alignmentediting';\nimport AlignmentUI from './alignmentui';\n\n/**\n * The text alignment plugin.\n *\n * For a detailed overview, check the {@glink features/text-alignment Text alignment feature documentation}\n * and the {@glink api/alignment package page}.\n *\n * This is a \"glue\" plugin which loads the {@link module:alignment/alignmentediting~AlignmentEditing} and\n * {@link module:alignment/alignmentui~AlignmentUI} plugins.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class Alignment extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get requires() {\n\t\treturn [ AlignmentEditing, AlignmentUI ];\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'Alignment';\n\t}\n}\n\n/**\n * The configuration of the {@link module:alignment/alignment~Alignment alignment feature}.\n *\n * Read more in {@link module:alignment/alignment~AlignmentConfig}.\n *\n * @member {module:alignment/alignment~AlignmentConfig} module:core/editor/editorconfig~EditorConfig#alignment\n */\n\n/**\n * The configuration of the {@link module:alignment/alignment~Alignment alignment feature}.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\talignment: {\n *\t\t\t\t\toptions: [ 'left', 'right' ]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.\n *\n * @interface AlignmentConfig\n */\n\n/**\n * Available alignment options.\n *\n * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`. Other values are ignored.\n *\n * **Note:** It is recommended to always use `'left'` or `'right'` as these are default values which the user should\n * normally be able to choose depending on the\n * {@glink features/ui-language#setting-the-language-of-the-content language of the editor content}.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\talignment: {\n *\t\t\t\t\toptions: [ 'left', 'right' ]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * By default the alignment is set inline using the `text-align` CSS property. To further customize the alignment,\n * you can provide names of classes for each alignment option using the `className` property.\n *\n * **Note:** Once you define the `className` property for one option, you need to specify it for all other options.\n *\n *\t\tClassicEditor\n *\t\t\t.create( editorElement, {\n *\t\t\t\talignment: {\n *\t\t\t\t\toptions: [\n *\t\t\t\t\t\t{ name: 'left', className: 'my-align-left' },\n *\t\t\t\t\t\t{ name: 'right', className: 'my-align-right' }\n *\t\t\t\t\t]\n *\t\t\t\t}\n *\t\t\t} )\n *\t\t\t.then( ... )\n *\t\t\t.catch( ... );\n *\n * See the demo of {@glink features/text-alignment#configuring-alignment-options custom alignment options}.\n *\n * @member {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} module:alignment/alignment~AlignmentConfig#options\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignmentcommand\n */\n\nimport { Command } from 'ckeditor5/src/core';\nimport { first } from 'ckeditor5/src/utils';\n\nimport { isDefault } from './utils';\n\nconst ALIGNMENT = 'alignment';\n\n/**\n * The alignment command plugin.\n *\n * @extends module:core/command~Command\n */\nexport default class AlignmentCommand extends Command {\n\t/**\n\t * @inheritDoc\n\t */\n\trefresh() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst firstBlock = first( this.editor.model.document.selection.getSelectedBlocks() );\n\n\t\t// As first check whether to enable or disable the command as the value will always be false if the command cannot be enabled.\n\t\tthis.isEnabled = !!firstBlock && this._canBeAligned( firstBlock );\n\n\t\t/**\n\t\t * A value of the current block's alignment.\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member {String} #value\n\t\t */\n\t\tif ( this.isEnabled && firstBlock.hasAttribute( 'alignment' ) ) {\n\t\t\tthis.value = firstBlock.getAttribute( 'alignment' );\n\t\t} else {\n\t\t\tthis.value = locale.contentLanguageDirection === 'rtl' ? 'right' : 'left';\n\t\t}\n\t}\n\n\t/**\n\t * Executes the command. Applies the alignment `value` to the selected blocks.\n\t * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,\n\t * the command will remove the attribute from the selected blocks.\n\t *\n\t * @param {Object} [options] Options for the executed command.\n\t * @param {String} [options.value] The value to apply.\n\t * @fires execute\n\t */\n\texecute( options = {} ) {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst model = editor.model;\n\t\tconst doc = model.document;\n\n\t\tconst value = options.value;\n\n\t\tmodel.change( writer => {\n\t\t\t// Get only those blocks from selected that can have alignment set\n\t\t\tconst blocks = Array.from( doc.selection.getSelectedBlocks() ).filter( block => this._canBeAligned( block ) );\n\t\t\tconst currentAlignment = blocks[ 0 ].getAttribute( 'alignment' );\n\n\t\t\t// Remove alignment attribute if current alignment is:\n\t\t\t// - default (should not be stored in model as it will bloat model data)\n\t\t\t// - equal to currently set\n\t\t\t// - or no value is passed - denotes default alignment.\n\t\t\tconst removeAlignment = isDefault( value, locale ) || currentAlignment === value || !value;\n\n\t\t\tif ( removeAlignment ) {\n\t\t\t\tremoveAlignmentFromSelection( blocks, writer );\n\t\t\t} else {\n\t\t\t\tsetAlignmentOnSelection( blocks, writer, value );\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Checks whether a block can have alignment set.\n\t *\n\t * @private\n\t * @param {module:engine/model/element~Element} block The block to be checked.\n\t * @returns {Boolean}\n\t */\n\t_canBeAligned( block ) {\n\t\treturn this.editor.model.schema.checkAttribute( block, ALIGNMENT );\n\t}\n}\n\n// Removes the alignment attribute from blocks.\n// @private\nfunction removeAlignmentFromSelection( blocks, writer ) {\n\tfor ( const block of blocks ) {\n\t\twriter.removeAttribute( ALIGNMENT, block );\n\t}\n}\n\n// Sets the alignment attribute on blocks.\n// @private\nfunction setAlignmentOnSelection( blocks, writer, alignment ) {\n\tfor ( const block of blocks ) {\n\t\twriter.setAttribute( ALIGNMENT, alignment, block );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignmentediting\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\n\nimport AlignmentCommand from './alignmentcommand';\nimport { isDefault, isSupported, normalizeAlignmentOptions, supportedOptions } from './utils';\n\n/**\n * The alignment editing feature. It introduces the {@link module:alignment/alignmentcommand~AlignmentCommand command} and adds\n * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.\n * @extends module:core/plugin~Plugin\n */\nexport default class AlignmentEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'AlignmentEditing';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\tsuper( editor );\n\n\t\teditor.config.define( 'alignment', {\n\t\t\toptions: [ ...supportedOptions.map( option => ( { name: option } ) ) ]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst schema = editor.model.schema;\n\n\t\tconst options = normalizeAlignmentOptions( editor.config.get( 'alignment.options' ) );\n\n\t\t// Filter out unsupported options and those that are redundant, e.g. `left` in LTR / `right` in RTL mode.\n\t\tconst optionsToConvert = options.filter(\n\t\t\toption => isSupported( option.name ) && !isDefault( option.name, locale )\n\t\t);\n\n\t\t// Once there is at least one `className` defined, we switch to alignment with classes.\n\t\tconst shouldUseClasses = optionsToConvert.some( option => !!option.className );\n\n\t\t// Allow alignment attribute on all blocks.\n\t\tschema.extend( '$block', { allowAttributes: 'alignment' } );\n\t\teditor.model.schema.setAttributeProperties( 'alignment', { isFormatting: true } );\n\n\t\tif ( shouldUseClasses ) {\n\t\t\teditor.conversion.attributeToAttribute( buildClassDefinition( optionsToConvert ) );\n\t\t} else {\n\t\t\t// Downcast inline styles.\n\t\t\teditor.conversion.for( 'downcast' ).attributeToAttribute( buildDowncastInlineDefinition( optionsToConvert ) );\n\t\t}\n\n\t\tconst upcastInlineDefinitions = buildUpcastInlineDefinitions( optionsToConvert );\n\n\t\t// Always upcast from inline styles.\n\t\tfor ( const definition of upcastInlineDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\tconst upcastCompatibilityDefinitions = buildUpcastCompatibilityDefinitions( optionsToConvert );\n\n\t\t// Always upcast from deprecated `align` attribute.\n\t\tfor ( const definition of upcastCompatibilityDefinitions ) {\n\t\t\teditor.conversion.for( 'upcast' ).attributeToAttribute( definition );\n\t\t}\n\n\t\teditor.commands.add( 'alignment', new AlignmentCommand( editor ) );\n\t}\n}\n\n// Prepare downcast conversion definition for inline alignment styling.\n// @private\nfunction buildDowncastInlineDefinition( options ) {\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview: {}\n\t};\n\n\tfor ( const { name } of options ) {\n\t\tdefinition.view[ name ] = {\n\t\t\tkey: 'style',\n\t\t\tvalue: {\n\t\t\t\t'text-align': name\n\t\t\t}\n\t\t};\n\t}\n\n\treturn definition;\n}\n\n// Prepare upcast definitions for inline alignment styles.\n// @private\nfunction buildUpcastInlineDefinitions( options ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'style',\n\t\t\t\tvalue: {\n\t\t\t\t\t'text-align': name\n\t\t\t\t}\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n// Prepare upcast definitions for deprecated `align` attribute.\n// @private\nfunction buildUpcastCompatibilityDefinitions( options ) {\n\tconst definitions = [];\n\n\tfor ( const { name } of options ) {\n\t\tdefinitions.push( {\n\t\t\tview: {\n\t\t\t\tkey: 'align',\n\t\t\t\tvalue: name\n\t\t\t},\n\t\t\tmodel: {\n\t\t\t\tkey: 'alignment',\n\t\t\t\tvalue: name\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn definitions;\n}\n\n// Prepare conversion definitions for upcast and downcast alignment with classes.\n// @private\nfunction buildClassDefinition( options ) {\n\tconst definition = {\n\t\tmodel: {\n\t\t\tkey: 'alignment',\n\t\t\tvalues: options.map( option => option.name )\n\t\t},\n\t\tview: {}\n\t};\n\n\tfor ( const option of options ) {\n\t\tdefinition.view[ option.name ] = {\n\t\t\tkey: 'class',\n\t\t\tvalue: option.className\n\t\t};\n\t}\n\n\treturn definition;\n}\n\n/**\n * The alignment configuration format descriptor.\n *\n *\t\tconst alignmentFormat = {\n *\t\t\tname: 'right',\n *\t\t\tclassName: 'my-align-right-class'\n *\t\t}\n *\n * @typedef {Object} module:alignment/alignmentediting~AlignmentFormat\n *\n * @property {'left'|'right'|'center'|'justify'} name One of the alignment names options.\n *\n * @property {String} className The CSS class used to represent the style in the view.\n * Used to override default, inline styling for alignment.\n */\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment/alignmentui\n */\n\nimport { Plugin, icons } from 'ckeditor5/src/core';\nimport { ButtonView, createDropdown, addToolbarToDropdown } from 'ckeditor5/src/ui';\n\nimport { isSupported, normalizeAlignmentOptions } from './utils';\n\nconst iconsMap = new Map( [\n\t[ 'left', icons.alignLeft ],\n\t[ 'right', icons.alignRight ],\n\t[ 'center', icons.alignCenter ],\n\t[ 'justify', icons.alignJustify ]\n] );\n\n/**\n * The default alignment UI plugin.\n *\n * It introduces the `'alignment:left'`, `'alignment:right'`, `'alignment:center'` and `'alignment:justify'` buttons\n * and the `'alignment'` dropdown.\n *\n * @extends module:core/plugin~Plugin\n */\nexport default class AlignmentUI extends Plugin {\n\t/**\n\t * Returns the localized option titles provided by the plugin.\n\t *\n\t * The following localized titles corresponding with\n\t * {@link module:alignment/alignment~AlignmentConfig#options} are available:\n\t *\n\t * * `'left'`,\n\t * * `'right'`,\n\t * * `'center'`,\n\t * * `'justify'`.\n\t *\n\t * @readonly\n\t * @type {Object.<String,String>}\n\t */\n\tget localizedOptionTitles() {\n\t\tconst t = this.editor.t;\n\n\t\treturn {\n\t\t\t'left': t( 'Align left' ),\n\t\t\t'right': t( 'Align right' ),\n\t\t\t'center': t( 'Align center' ),\n\t\t\t'justify': t( 'Justify' )\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get pluginName() {\n\t\treturn 'AlignmentUI';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tconst editor = this.editor;\n\t\tconst componentFactory = editor.ui.componentFactory;\n\t\tconst t = editor.t;\n\t\tconst options = normalizeAlignmentOptions( editor.config.get( 'alignment.options' ) );\n\n\t\toptions\n\t\t\t.map( option => option.name )\n\t\t\t.filter( isSupported )\n\t\t\t.forEach( option => this._addButton( option ) );\n\n\t\tcomponentFactory.add( 'alignment', locale => {\n\t\t\tconst dropdownView = createDropdown( locale );\n\n\t\t\t// Add existing alignment buttons to dropdown's toolbar.\n\t\t\tconst buttons = options.map( option => componentFactory.create( `alignment:${ option.name }` ) );\n\t\t\taddToolbarToDropdown( dropdownView, buttons );\n\n\t\t\t// Configure dropdown properties an behavior.\n\t\t\tdropdownView.buttonView.set( {\n\t\t\t\tlabel: t( 'Text alignment' ),\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tdropdownView.toolbarView.isVertical = true;\n\t\t\tdropdownView.toolbarView.ariaLabel = t( 'Text alignment toolbar' );\n\n\t\t\tdropdownView.extendTemplate( {\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: 'ck-alignment-dropdown'\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// The default icon depends on the direction of the content.\n\t\t\tconst defaultIcon = locale.contentLanguageDirection === 'rtl' ? iconsMap.get( 'right' ) : iconsMap.get( 'left' );\n\n\t\t\t// Change icon to reflect current selection's alignment.\n\t\t\tdropdownView.buttonView.bind( 'icon' ).toMany( buttons, 'isOn', ( ...areActive ) => {\n\t\t\t\t// Get the index of an active button.\n\t\t\t\tconst index = areActive.findIndex( value => value );\n\n\t\t\t\t// If none of the commands is active, display either defaultIcon or the first button's icon.\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\treturn defaultIcon;\n\t\t\t\t}\n\n\t\t\t\t// Return active button's icon.\n\t\t\t\treturn buttons[ index ].icon;\n\t\t\t} );\n\n\t\t\t// Enable button if any of the buttons is enabled.\n\t\t\tdropdownView.bind( 'isEnabled' ).toMany( buttons, 'isEnabled', ( ...areEnabled ) => areEnabled.some( isEnabled => isEnabled ) );\n\n\t\t\treturn dropdownView;\n\t\t} );\n\t}\n\n\t/**\n\t * Helper method for initializing the button and linking it with an appropriate command.\n\t *\n\t * @private\n\t * @param {String} option The name of the alignment option for which the button is added.\n\t */\n\t_addButton( option ) {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( `alignment:${ option }`, locale => {\n\t\t\tconst command = editor.commands.get( 'alignment' );\n\t\t\tconst buttonView = new ButtonView( locale );\n\n\t\t\tbuttonView.set( {\n\t\t\t\tlabel: this.localizedOptionTitles[ option ],\n\t\t\t\ticon: iconsMap.get( option ),\n\t\t\t\ttooltip: true,\n\t\t\t\tisToggleable: true\n\t\t\t} );\n\n\t\t\t// Bind button model to command.\n\t\t\tbuttonView.bind( 'isEnabled' ).to( command );\n\t\t\tbuttonView.bind( 'isOn' ).to( command, 'value', value => value === option );\n\n\t\t\t// Execute command.\n\t\t\tthis.listenTo( buttonView, 'execute', () => {\n\t\t\t\teditor.execute( 'alignment', { value: option } );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\nimport { CKEditorError, logWarning } from 'ckeditor5/src/utils';\n\n/**\n * @module alignment/utils\n */\n\n/**\n * The list of supported alignment options:\n *\n * * `'left'`,\n * * `'right'`,\n * * `'center'`,\n * * `'justify'`\n */\nexport const supportedOptions = [ 'left', 'right', 'center', 'justify' ];\n\n/**\n * Checks whether the passed option is supported by {@link module:alignment/alignmentediting~AlignmentEditing}.\n *\n * @param {String} option The option value to check.\n * @returns {Boolean}\n */\nexport function isSupported( option ) {\n\treturn supportedOptions.includes( option );\n}\n\n/**\n * Checks whether alignment is the default one considering the direction\n * of the editor content.\n *\n * @param {String} alignment The name of the alignment to check.\n * @param {module:utils/locale~Locale} locale The {@link module:core/editor/editor~Editor#locale} instance.\n * @returns {Boolean}\n */\nexport function isDefault( alignment, locale ) {\n\t// Right now only LTR is supported so the 'left' value is always the default one.\n\n\tif ( locale.contentLanguageDirection == 'rtl' ) {\n\t\treturn alignment === 'right';\n\t} else {\n\t\treturn alignment === 'left';\n\t}\n}\n\n/**\n * Brings the configuration to the common form, an array of objects.\n *\n * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Alignment plugin configuration.\n * @returns {Array.<module:alignment/alignmentediting~AlignmentFormat>} Normalized object holding the configuration.\n */\nexport function normalizeAlignmentOptions( configuredOptions ) {\n\tconst normalizedOptions = configuredOptions\n\t\t.map( option => {\n\t\t\tlet result;\n\n\t\t\tif ( typeof option == 'string' ) {\n\t\t\t\tresult = { name: option };\n\t\t\t} else {\n\t\t\t\tresult = option;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} )\n\t\t// Remove all unknown options.\n\t\t.filter( option => {\n\t\t\tconst isNameValid = !!supportedOptions.includes( option.name );\n\t\t\tif ( !isNameValid ) {\n\t\t\t\t/**\n\t\t\t\t * The `name` in one of the `alignment.options` is not recognized.\n\t\t\t\t * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-name-not-recognized\n\t\t\t\t * @param {Object} option Options with unknown value of the `name` property.\n\t\t\t\t */\n\t\t\t\tlogWarning( 'alignment-config-name-not-recognized', { option } );\n\t\t\t}\n\n\t\t\treturn isNameValid;\n\t\t} );\n\n\tconst classNameCount = normalizedOptions.filter( option => !!option.className ).length;\n\n\t// We either use classes for all styling options or for none.\n\tif ( classNameCount && classNameCount < normalizedOptions.length ) {\n\t\t/**\n\t\t * The `className` property has to be defined for all options once at least one option declares `className`.\n\t\t *\n\t\t * @error alignment-config-classnames-are-missing\n\t\t * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Contents of `alignment.options`.\n\t\t */\n\t\tthrow new CKEditorError( 'alignment-config-classnames-are-missing', { configuredOptions } );\n\t}\n\n\t// Validate resulting config.\n\tnormalizedOptions.forEach( ( option, index, allOptions ) => {\n\t\tconst succeedingOptions = allOptions.slice( index + 1 );\n\t\tconst nameAlreadyExists = succeedingOptions.some( item => item.name == option.name );\n\n\t\tif ( nameAlreadyExists ) {\n\t\t\t/**\n\t\t\t * The same `name` in one of the `alignment.options` was already declared.\n\t\t\t * Each `name` representing one alignment option can be set exactly once.\n\t\t\t *\n\t\t\t * @error alignment-config-name-already-defined\n\t\t\t * @param {Object} option First option that declares given `name`.\n\t\t\t * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions Contents of `alignment.options`.\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'alignment-config-name-already-defined', { option, configuredOptions } );\n\t\t}\n\n\t\t// The `className` property is present. Check for duplicates then.\n\t\tif ( option.className ) {\n\t\t\tconst classNameAlreadyExists = succeedingOptions.some( item => item.className == option.className );\n\n\t\t\tif ( classNameAlreadyExists ) {\n\t\t\t\t/**\n\t\t\t\t * The same `className` in one of the `alignment.options` was already declared.\n\t\t\t\t *\n\t\t\t\t * @error alignment-config-classname-already-defined\n\t\t\t\t * @param {Object} option First option that declares given `className`.\n\t\t\t\t * @param {Array.<String|module:alignment/alignmentediting~AlignmentFormat>} configuredOptions\n\t\t\t\t * Contents of `alignment.options`.\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'alignment-config-classname-already-defined', { option, configuredOptions } );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn normalizedOptions;\n}\n","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/core.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/ui.js\");","module.exports = (__webpack_require__(/*! dll-reference CKEditor5.dll */ \"dll-reference CKEditor5.dll\"))(\"./src/utils.js\");","module.exports = CKEditor5.dll;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module alignment\n */\n\nexport { default as Alignment } from './alignment';\nexport { default as AlignmentEditing } from './alignmentediting';\nexport { default as AlignmentUI } from './alignmentui';\n"],"sourceRoot":""}
|