@ckeditor/ckeditor5-table 0.0.0-nightly-next-20260123.0 → 0.0.0-nightly-next-20260124.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/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -72,8 +72,8 @@ const FLOAT_VALUES_REG_EXP = /^(left|none|right)$/;
|
|
|
72
72
|
}
|
|
73
73
|
const localDefaultValue = getDefaultValueAdjusted(defaultValue, '', data);
|
|
74
74
|
let value = viewElement.getAttribute(attributeName);
|
|
75
|
-
if (value && attributeType == 'length'
|
|
76
|
-
value
|
|
75
|
+
if (value && attributeType == 'length') {
|
|
76
|
+
value = parseFloat(value) + (value.endsWith('%') ? '%' : 'px');
|
|
77
77
|
}
|
|
78
78
|
if (localDefaultValue !== value) {
|
|
79
79
|
return value;
|
|
@@ -11606,9 +11606,14 @@ const toPx = /* #__PURE__ */ toUnit('px');
|
|
|
11606
11606
|
const modelTable = modelLeftCell.findAncestor('table');
|
|
11607
11607
|
const leftColumnIndex = getColumnEdgesIndexes(modelLeftCell, this._tableUtilsPlugin).rightEdge;
|
|
11608
11608
|
const lastColumnIndex = this._tableUtilsPlugin.getColumns(modelTable) - 1;
|
|
11609
|
+
let tableAlignment = modelTable.getAttribute('tableAlignment');
|
|
11610
|
+
if (modelTable.getAttribute('tableType') !== 'layout') {
|
|
11611
|
+
tableAlignment ||= editor.config.get('table.tableProperties.defaultProperties.alignment');
|
|
11612
|
+
tableAlignment ||= 'center';
|
|
11613
|
+
}
|
|
11609
11614
|
const isRightEdge = leftColumnIndex === lastColumnIndex;
|
|
11610
|
-
const isTableCentered = !modelTable.hasAttribute('tableAlignment');
|
|
11611
11615
|
const isLtrContent = editor.locale.contentLanguageDirection !== 'rtl';
|
|
11616
|
+
const isTableCentered = tableAlignment === 'center';
|
|
11612
11617
|
const viewTable = viewLeftCell.findAncestor('table');
|
|
11613
11618
|
const viewFigure = viewTable.findAncestor('figure');
|
|
11614
11619
|
const viewColgroup = [
|