@ckeditor/ckeditor5-table 39.0.2 → 40.1.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.
@@ -3,6 +3,16 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  import { isWidget } from 'ckeditor5/src/widget';
6
+ /**
7
+ * Depending on the position of the selection either return the selected table or the table higher in the hierarchy.
8
+ */
9
+ export function getSelectionAffectedTableWidget(selection) {
10
+ const selectedTable = getSelectedTableWidget(selection);
11
+ if (selectedTable) {
12
+ return selectedTable;
13
+ }
14
+ return getTableWidgetAncestor(selection);
15
+ }
6
16
  /**
7
17
  * Returns a table widget editing view element if one is selected.
8
18
  */