@ckeditor/ckeditor5-table 48.2.0-alpha.5 → 48.2.0-alpha.7
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.css.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1650,6 +1650,15 @@ const downcastTableAlignmentConfig = {
|
|
|
1650
1650
|
});
|
|
1651
1651
|
// Convert view table to model table.
|
|
1652
1652
|
const conversionResult = conversionApi.convertItem(viewTable, data.modelCursor);
|
|
1653
|
+
// When nothing was converted there is no model table to attach the figure's children to.
|
|
1654
|
+
/* istanbul ignore if: defensive guard for the `ModelRange | null` return type -- @preserve */ if (!conversionResult.modelRange) {
|
|
1655
|
+
// Revert consumed figure so other features can convert it.
|
|
1656
|
+
conversionApi.consumable.revert(data.viewItem, {
|
|
1657
|
+
name: true,
|
|
1658
|
+
classes: 'table'
|
|
1659
|
+
});
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1653
1662
|
// Get table element from conversion result.
|
|
1654
1663
|
const modelTable = first(conversionResult.modelRange.getItems());
|
|
1655
1664
|
// When table wasn't successfully converted then finish conversion.
|
|
@@ -1660,7 +1669,7 @@ const downcastTableAlignmentConfig = {
|
|
|
1660
1669
|
classes: 'table'
|
|
1661
1670
|
});
|
|
1662
1671
|
// If anyway some table content was converted, we have to pass the model range and cursor.
|
|
1663
|
-
if (
|
|
1672
|
+
if (!conversionResult.modelRange.isCollapsed) {
|
|
1664
1673
|
data.modelRange = conversionResult.modelRange;
|
|
1665
1674
|
data.modelCursor = conversionResult.modelCursor;
|
|
1666
1675
|
}
|