@ckeditor/ckeditor5-table 29.2.0 → 32.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/LICENSE.md +2 -2
- package/build/table.js +3 -3
- package/build/translations/cs.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/uz.js +1 -0
- package/build/translations/zh.js +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/cs.po +4 -4
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/es.po +12 -12
- package/lang/translations/et.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +11 -11
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +3 -3
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +4 -4
- package/lang/translations/pt-br.po +4 -4
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +4 -4
- package/lang/translations/sr.po +4 -4
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/uz.po +261 -0
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +4 -4
- package/package.json +24 -24
- package/src/commands/insertcolumncommand.js +1 -1
- package/src/commands/insertrowcommand.js +1 -1
- package/src/commands/inserttablecommand.js +1 -1
- package/src/commands/mergecellcommand.js +1 -1
- package/src/commands/mergecellscommand.js +1 -1
- package/src/commands/removecolumncommand.js +1 -1
- package/src/commands/removerowcommand.js +1 -1
- package/src/commands/selectcolumncommand.js +11 -1
- package/src/commands/selectrowcommand.js +11 -1
- package/src/commands/setheadercolumncommand.js +1 -1
- package/src/commands/setheaderrowcommand.js +1 -1
- package/src/commands/splitcellcommand.js +1 -1
- package/src/converters/downcast.js +2 -19
- package/src/converters/table-caption-post-fixer.js +1 -1
- package/src/converters/table-cell-paragraph-post-fixer.js +1 -1
- package/src/converters/table-cell-refresh-post-fixer.js +1 -1
- package/src/converters/table-heading-rows-refresh-post-fixer.js +24 -7
- package/src/converters/table-layout-post-fixer.js +1 -1
- package/src/converters/tableproperties.js +6 -5
- package/src/converters/upcasttable.js +7 -1
- package/src/index.js +1 -1
- package/src/table.js +1 -1
- package/src/tablecaption/tablecaptionediting.js +1 -1
- package/src/tablecaption/tablecaptionui.js +3 -3
- package/src/tablecaption/toggletablecaptioncommand.js +3 -3
- package/src/tablecaption/utils.js +1 -1
- package/src/tablecaption.js +1 -1
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderstylecommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellheightcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpaddingcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpropertycommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellwidthcommand.js +2 -2
- package/src/tablecellproperties/tablecellpropertiesediting.js +42 -35
- package/src/tablecellproperties/tablecellpropertiesui.js +1 -1
- package/src/tablecellproperties/ui/tablecellpropertiesview.js +11 -2
- package/src/tablecellproperties.js +1 -1
- package/src/tableclipboard.js +1 -1
- package/src/tableediting.js +1 -1
- package/src/tablekeyboard.js +20 -5
- package/src/tablemouse/mouseeventsobserver.js +1 -1
- package/src/tablemouse.js +1 -1
- package/src/tableproperties/commands/tablealignmentcommand.js +2 -2
- package/src/tableproperties/commands/tablebackgroundcolorcommand.js +2 -2
- package/src/tableproperties/commands/tablebordercolorcommand.js +2 -2
- package/src/tableproperties/commands/tableborderstylecommand.js +2 -2
- package/src/tableproperties/commands/tableborderwidthcommand.js +2 -2
- package/src/tableproperties/commands/tableheightcommand.js +2 -2
- package/src/tableproperties/commands/tablepropertycommand.js +2 -2
- package/src/tableproperties/commands/tablewidthcommand.js +2 -2
- package/src/tableproperties/tablepropertiesediting.js +29 -21
- package/src/tableproperties/tablepropertiesui.js +1 -1
- package/src/tableproperties/ui/tablepropertiesview.js +11 -2
- package/src/tableproperties.js +1 -1
- package/src/tableselection.js +1 -1
- package/src/tabletoolbar.js +1 -1
- package/src/tableui.js +1 -1
- package/src/tableutils.js +1 -1
- package/src/tablewalker.js +1 -1
- package/src/ui/colorinputview.js +1 -1
- package/src/ui/formrowview.js +1 -1
- package/src/ui/inserttableview.js +1 -1
- package/src/utils/common.js +1 -1
- package/src/utils/selection.js +1 -1
- package/src/utils/structure.js +1 -1
- package/src/utils/table-properties.js +1 -1
- package/src/utils/ui/contextualballoon.js +4 -9
- package/src/utils/ui/table-properties.js +1 -1
- package/src/utils/ui/widget.js +1 -1
- package/theme/colorinput.css +4 -1
- package/theme/form.css +1 -1
- package/theme/formrow.css +1 -1
- package/theme/inserttable.css +1 -1
- package/theme/table.css +1 -1
- package/theme/tablecaption.css +1 -1
- package/theme/tablecellproperties.css +1 -1
- package/theme/tableediting.css +1 -1
- package/theme/tableform.css +1 -1
- package/theme/tableproperties.css +1 -1
- package/theme/tableselection.css +1 -1
- package/CHANGELOG.md +0 -261
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -430,6 +430,16 @@ export default class TableCellPropertiesView extends View {
|
|
|
430
430
|
this.keystrokes.listenTo( this.element );
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
+
/**
|
|
434
|
+
* @inheritDoc
|
|
435
|
+
*/
|
|
436
|
+
destroy() {
|
|
437
|
+
super.destroy();
|
|
438
|
+
|
|
439
|
+
this.focusTracker.destroy();
|
|
440
|
+
this.keystrokes.destroy();
|
|
441
|
+
}
|
|
442
|
+
|
|
433
443
|
/**
|
|
434
444
|
* Focuses the fist focusable field in the form.
|
|
435
445
|
*/
|
|
@@ -799,7 +809,6 @@ export default class TableCellPropertiesView extends View {
|
|
|
799
809
|
label: t( 'Cancel' ),
|
|
800
810
|
icon: icons.cancel,
|
|
801
811
|
class: 'ck-button-cancel',
|
|
802
|
-
type: 'cancel',
|
|
803
812
|
withText: true
|
|
804
813
|
} );
|
|
805
814
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tableclipboard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tableediting.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tablekeyboard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -218,10 +218,25 @@ export default class TableKeyboard extends Plugin {
|
|
|
218
218
|
return false;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
//
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
// When the selection is not collapsed.
|
|
222
|
+
if ( !selection.isCollapsed ) {
|
|
223
|
+
if ( expandSelection ) {
|
|
224
|
+
// Navigation is in the opposite direction than the selection direction so this is shrinking of the selection.
|
|
225
|
+
// Selection for sure will not approach cell edge.
|
|
226
|
+
//
|
|
227
|
+
// With a special case when all cell content is selected - then selection should expand to the other cell.
|
|
228
|
+
// Note: When the entire cell gets selected using CTRL+A, the selection is always forward.
|
|
229
|
+
if ( selection.isBackward == isForward && !selection.containsEntireContent( tableCell ) ) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
} else {
|
|
233
|
+
const selectedElement = selection.getSelectedElement();
|
|
234
|
+
|
|
235
|
+
// It will collapse for non-object selected so it's not going to move to other cell.
|
|
236
|
+
if ( !selectedElement || !model.schema.isObject( selectedElement ) ) {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
225
240
|
}
|
|
226
241
|
|
|
227
242
|
// Let's check if the selection is at the beginning/end of the cell.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tablemouse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -31,6 +31,6 @@ export default class TableAlignmentCommand extends TablePropertyCommand {
|
|
|
31
31
|
* @param {String} defaultValue The default value for the "alignment" attribute.
|
|
32
32
|
*/
|
|
33
33
|
constructor( editor, defaultValue ) {
|
|
34
|
-
super( editor, '
|
|
34
|
+
super( editor, 'tableAlignment', defaultValue );
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -31,6 +31,6 @@ export default class TableBackgroundColorCommand extends TablePropertyCommand {
|
|
|
31
31
|
* @param {String} defaultValue The default value of the attribute.
|
|
32
32
|
*/
|
|
33
33
|
constructor( editor, defaultValue ) {
|
|
34
|
-
super( editor, '
|
|
34
|
+
super( editor, 'tableBackgroundColor', defaultValue );
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -32,7 +32,7 @@ export default class TableBorderColorCommand extends TablePropertyCommand {
|
|
|
32
32
|
* @param {String} defaultValue The default value of the attribute.
|
|
33
33
|
*/
|
|
34
34
|
constructor( editor, defaultValue ) {
|
|
35
|
-
super( editor, '
|
|
35
|
+
super( editor, 'tableBorderColor', defaultValue );
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -32,7 +32,7 @@ export default class TableBorderStyleCommand extends TablePropertyCommand {
|
|
|
32
32
|
* @param {String} defaultValue The default value of the attribute.
|
|
33
33
|
*/
|
|
34
34
|
constructor( editor, defaultValue ) {
|
|
35
|
-
super( editor, '
|
|
35
|
+
super( editor, 'tableBorderStyle', defaultValue );
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -40,7 +40,7 @@ export default class TableBorderWidthCommand extends TablePropertyCommand {
|
|
|
40
40
|
* @param {String} defaultValue The default value of the attribute.
|
|
41
41
|
*/
|
|
42
42
|
constructor( editor, defaultValue ) {
|
|
43
|
-
super( editor, '
|
|
43
|
+
super( editor, 'tableBorderWidth', defaultValue );
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -40,7 +40,7 @@ export default class TableHeightCommand extends TablePropertyCommand {
|
|
|
40
40
|
* @param {String} defaultValue The default value of the attribute.
|
|
41
41
|
*/
|
|
42
42
|
constructor( editor, defaultValue ) {
|
|
43
|
-
super( editor, '
|
|
43
|
+
super( editor, 'tableHeight', defaultValue );
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -77,7 +77,7 @@ export default class TablePropertyCommand extends Command {
|
|
|
77
77
|
const table = selection.getFirstPosition().findAncestor( 'table' );
|
|
78
78
|
const valueToSet = this._getValueToSet( value );
|
|
79
79
|
|
|
80
|
-
model.enqueueChange( batch
|
|
80
|
+
model.enqueueChange( batch, writer => {
|
|
81
81
|
if ( valueToSet ) {
|
|
82
82
|
writer.setAttribute( this.attributeName, valueToSet, table );
|
|
83
83
|
} else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -40,7 +40,7 @@ export default class TableWidthCommand extends TablePropertyCommand {
|
|
|
40
40
|
* @param {String} defaultValue The default value of the attribute.
|
|
41
41
|
*/
|
|
42
42
|
constructor( editor, defaultValue ) {
|
|
43
|
-
super( editor, '
|
|
43
|
+
super( editor, 'tableWidth', defaultValue );
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -34,10 +34,10 @@ const FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;
|
|
|
34
34
|
*
|
|
35
35
|
* Introduces table's model attributes and their conversion:
|
|
36
36
|
*
|
|
37
|
-
* - border: `
|
|
38
|
-
* - background color: `
|
|
39
|
-
* - horizontal alignment: `
|
|
40
|
-
* - width & height: `
|
|
37
|
+
* - border: `tableBorderStyle`, `tableBorderColor` and `tableBorderWidth`
|
|
38
|
+
* - background color: `tableBackgroundColor`
|
|
39
|
+
* - horizontal alignment: `tableAlignment`
|
|
40
|
+
* - width & height: `tableWidth` & `tableHeight`
|
|
41
41
|
*
|
|
42
42
|
* It also registers commands used to manipulate the above attributes:
|
|
43
43
|
*
|
|
@@ -91,14 +91,14 @@ export default class TablePropertiesEditing extends Plugin {
|
|
|
91
91
|
editor.commands.add( 'tableAlignment', new TableAlignmentCommand( editor, defaultTableProperties.alignment ) );
|
|
92
92
|
|
|
93
93
|
enableTableToFigureProperty( schema, conversion, {
|
|
94
|
-
modelAttribute: '
|
|
94
|
+
modelAttribute: 'tableWidth',
|
|
95
95
|
styleName: 'width',
|
|
96
96
|
defaultValue: defaultTableProperties.width
|
|
97
97
|
} );
|
|
98
98
|
editor.commands.add( 'tableWidth', new TableWidthCommand( editor, defaultTableProperties.width ) );
|
|
99
99
|
|
|
100
100
|
enableTableToFigureProperty( schema, conversion, {
|
|
101
|
-
modelAttribute: '
|
|
101
|
+
modelAttribute: 'tableHeight',
|
|
102
102
|
styleName: 'height',
|
|
103
103
|
defaultValue: defaultTableProperties.height
|
|
104
104
|
} );
|
|
@@ -106,7 +106,7 @@ export default class TablePropertiesEditing extends Plugin {
|
|
|
106
106
|
|
|
107
107
|
editor.data.addStyleProcessorRules( addBackgroundRules );
|
|
108
108
|
enableProperty( schema, conversion, {
|
|
109
|
-
modelAttribute: '
|
|
109
|
+
modelAttribute: 'tableBackgroundColor',
|
|
110
110
|
styleName: 'background-color',
|
|
111
111
|
defaultValue: defaultTableProperties.backgroundColor
|
|
112
112
|
} );
|
|
@@ -117,22 +117,30 @@ export default class TablePropertiesEditing extends Plugin {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
// Enables `'
|
|
120
|
+
// Enables `tableBorderStyle'`, `tableBorderColor'` and `tableBorderWidth'` attributes for table.
|
|
121
121
|
//
|
|
122
122
|
// @param {module:engine/model/schema~Schema} schema
|
|
123
123
|
// @param {module:engine/conversion/conversion~Conversion} conversion
|
|
124
124
|
// @param {Object} defaultBorder The default border values.
|
|
125
|
-
// @param {String} defaultBorder.color The default `
|
|
126
|
-
// @param {String} defaultBorder.style The default `
|
|
127
|
-
// @param {String} defaultBorder.width The default `
|
|
125
|
+
// @param {String} defaultBorder.color The default `tableBorderColor` value.
|
|
126
|
+
// @param {String} defaultBorder.style The default `tableBorderStyle` value.
|
|
127
|
+
// @param {String} defaultBorder.width The default `tableBorderWidth` value.
|
|
128
128
|
function enableBorderProperties( schema, conversion, defaultBorder ) {
|
|
129
|
+
const modelAttributes = {
|
|
130
|
+
width: 'tableBorderWidth',
|
|
131
|
+
color: 'tableBorderColor',
|
|
132
|
+
style: 'tableBorderStyle'
|
|
133
|
+
};
|
|
134
|
+
|
|
129
135
|
schema.extend( 'table', {
|
|
130
|
-
allowAttributes:
|
|
136
|
+
allowAttributes: Object.values( modelAttributes )
|
|
131
137
|
} );
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
downcastTableAttribute( conversion, { modelAttribute:
|
|
138
|
+
|
|
139
|
+
upcastBorderStyles( conversion, 'table', modelAttributes, defaultBorder );
|
|
140
|
+
|
|
141
|
+
downcastTableAttribute( conversion, { modelAttribute: modelAttributes.color, styleName: 'border-color' } );
|
|
142
|
+
downcastTableAttribute( conversion, { modelAttribute: modelAttributes.style, styleName: 'border-style' } );
|
|
143
|
+
downcastTableAttribute( conversion, { modelAttribute: modelAttributes.width, styleName: 'border-width' } );
|
|
136
144
|
}
|
|
137
145
|
|
|
138
146
|
// Enables the `'alignment'` attribute for table.
|
|
@@ -142,14 +150,14 @@ function enableBorderProperties( schema, conversion, defaultBorder ) {
|
|
|
142
150
|
// @param {String} defaultValue The default alignment value.
|
|
143
151
|
function enableAlignmentProperty( schema, conversion, defaultValue ) {
|
|
144
152
|
schema.extend( 'table', {
|
|
145
|
-
allowAttributes: [ '
|
|
153
|
+
allowAttributes: [ 'tableAlignment' ]
|
|
146
154
|
} );
|
|
147
155
|
|
|
148
156
|
conversion.for( 'downcast' )
|
|
149
157
|
.attributeToAttribute( {
|
|
150
158
|
model: {
|
|
151
159
|
name: 'table',
|
|
152
|
-
key: '
|
|
160
|
+
key: 'tableAlignment'
|
|
153
161
|
},
|
|
154
162
|
view: alignment => ( {
|
|
155
163
|
key: 'style',
|
|
@@ -171,7 +179,7 @@ function enableAlignmentProperty( schema, conversion, defaultValue ) {
|
|
|
171
179
|
}
|
|
172
180
|
},
|
|
173
181
|
model: {
|
|
174
|
-
key: '
|
|
182
|
+
key: 'tableAlignment',
|
|
175
183
|
value: viewElement => {
|
|
176
184
|
let align = viewElement.getStyle( 'float' );
|
|
177
185
|
|
|
@@ -193,7 +201,7 @@ function enableAlignmentProperty( schema, conversion, defaultValue ) {
|
|
|
193
201
|
},
|
|
194
202
|
model: {
|
|
195
203
|
name: 'table',
|
|
196
|
-
key: '
|
|
204
|
+
key: 'tableAlignment',
|
|
197
205
|
value: viewElement => {
|
|
198
206
|
const align = viewElement.getAttribute( 'align' );
|
|
199
207
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -379,6 +379,16 @@ export default class TablePropertiesView extends View {
|
|
|
379
379
|
this.keystrokes.listenTo( this.element );
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
+
/**
|
|
383
|
+
* @inheritDoc
|
|
384
|
+
*/
|
|
385
|
+
destroy() {
|
|
386
|
+
super.destroy();
|
|
387
|
+
|
|
388
|
+
this.focusTracker.destroy();
|
|
389
|
+
this.keystrokes.destroy();
|
|
390
|
+
}
|
|
391
|
+
|
|
382
392
|
/**
|
|
383
393
|
* Focuses the fist focusable field in the form.
|
|
384
394
|
*/
|
|
@@ -690,7 +700,6 @@ export default class TablePropertiesView extends View {
|
|
|
690
700
|
label: t( 'Cancel' ),
|
|
691
701
|
icon: icons.cancel,
|
|
692
702
|
class: 'ck-button-cancel',
|
|
693
|
-
type: 'cancel',
|
|
694
703
|
withText: true
|
|
695
704
|
} );
|
|
696
705
|
|
package/src/tableproperties.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tableselection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tabletoolbar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tableui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tableutils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/tablewalker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/ui/colorinputview.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/ui/formrowview.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/utils/common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/utils/selection.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/utils/structure.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @module table/utils/ui/contextualballoon
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { centeredBalloonPositionForLongWidgets } from 'ckeditor5/src/widget';
|
|
11
10
|
import { Rect } from 'ckeditor5/src/utils';
|
|
12
11
|
import { BalloonPanelView } from 'ckeditor5/src/ui';
|
|
13
12
|
|
|
@@ -21,12 +20,8 @@ const BALLOON_POSITIONS = [
|
|
|
21
20
|
DEFAULT_BALLOON_POSITIONS.northArrowSouthEast,
|
|
22
21
|
DEFAULT_BALLOON_POSITIONS.southArrowNorth,
|
|
23
22
|
DEFAULT_BALLOON_POSITIONS.southArrowNorthWest,
|
|
24
|
-
DEFAULT_BALLOON_POSITIONS.southArrowNorthEast
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const TABLE_PROPERTIES_BALLOON_POSITIONS = [
|
|
28
|
-
...BALLOON_POSITIONS,
|
|
29
|
-
centeredBalloonPositionForLongWidgets
|
|
23
|
+
DEFAULT_BALLOON_POSITIONS.southArrowNorthEast,
|
|
24
|
+
DEFAULT_BALLOON_POSITIONS.viewportStickyNorth
|
|
30
25
|
];
|
|
31
26
|
|
|
32
27
|
/**
|
|
@@ -69,7 +64,7 @@ export function getBalloonTablePositionData( editor ) {
|
|
|
69
64
|
|
|
70
65
|
return {
|
|
71
66
|
target: editor.editing.view.domConverter.viewToDom( viewTable ),
|
|
72
|
-
positions:
|
|
67
|
+
positions: BALLOON_POSITIONS
|
|
73
68
|
};
|
|
74
69
|
}
|
|
75
70
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/utils/ui/widget.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/theme/colorinput.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2003-
|
|
2
|
+
* Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
& .ck.ck-input-color__button {
|
|
26
|
+
/* Resolving issue with misaligned buttons on Safari (see #10589) */
|
|
27
|
+
display: flex;
|
|
28
|
+
|
|
26
29
|
& .ck.ck-input-color__button__preview {
|
|
27
30
|
position: relative;
|
|
28
31
|
overflow: hidden;
|
package/theme/form.css
CHANGED
package/theme/formrow.css
CHANGED
package/theme/inserttable.css
CHANGED
package/theme/table.css
CHANGED
package/theme/tablecaption.css
CHANGED