# table/tablerowresize/utils

module

<a id="functions"></a>

## Functions

<a id="function-getRowEdgesIndexes"></a>

### `getRowEdgesIndexes( cell, tableUtils ) → object` _(internal)_

Returns the row indexes on the top and bottom edges of a cell. They differ if the cell spans across multiple rows. The bottom edge is the row that dragging the bottom edge of the cell resizes.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L26)

#### Parameters

* `cell: ModelElement`

  A table cell model element.

* `tableUtils: TableUtils`

  The Table Utils plugin instance.

#### Returns

* `object`

  An object containing the indexes of the top and bottom edges of the cell.

<a id="function-getTableRows"></a>

### `getTableRows( table ) → Array<ModelElement>` _(internal)_

Returns the `tableRow` elements of a table, skipping other children such as the column group or the caption.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L125)

#### Parameters

* `table: ModelElement`

#### Returns

* `Array<ModelElement>`

<a id="function-getUnsetHeightValue"></a>

### `getUnsetHeightValue( editor, table, type ) → string | null` _(internal)_

Returns the value that unsets the table or the cell height: `'auto'` when a default height is configured, as a removed height would fall back to the default one from the content styles, or `null` to remove the height. The layout tables do not use the default table and cell properties.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L69)

#### Parameters

* `editor: Editor`
* `table: ModelElement`
* `type: 'table' | 'cell'`

#### Returns

* `string | null`

<a id="function-isEmptyHeightValue"></a>

### `isEmptyHeightValue( value ) → boolean` _(internal)_

Checks whether a height value is empty: missing, an empty string, or only whitespace (the height field accepts whitespace as an empty value).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L116)

#### Parameters

* `value: string | number | undefined`

#### Returns

* `boolean`

<a id="function-removeRowHeight"></a>

### `removeRowHeight( writer, row, unsetCellHeight ) → void` _(internal)_

Removes the height of a table row, together with the height of every cell covering that row, so the row gets the height its content requires.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L57)

#### Parameters

* `writer: ModelWriter`

* `row: ModelElement`

* `unsetCellHeight: string | null`

  The height set on the cells covering the row in place of their own height: `'auto'` to override a configured default cell height, or `null` to remove the cell height.

#### Returns

* `void`

<a id="function-setRowHeight"></a>

### `setRowHeight( writer, row, height, unsetCellHeight ) → void` _(internal)_

Sets the height of a table row and clears the height of every cell covering that row, including cells spanned from the rows above. The browser renders a row as high as its highest cell, so a cell height would keep the row from shrinking.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L44)

#### Parameters

* `writer: ModelWriter`

* `row: ModelElement`

* `height: string`

* `unsetCellHeight: string | null`

  The height set on the cells covering the row in place of their own height: `'auto'` to override a configured default cell height, or `null` to remove the cell height.

#### Returns

* `void`

<a id="function-toRowHeightInPixels"></a>

### `toRowHeightInPixels( value ) → string | null` _(internal)_

Returns a row height value (a non-negative number without a unit or in pixels) as a height in pixels, for example `'50'` as `'50px'`. Returns `null` for any other value, as a changed row height is always stored in pixels.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-table/src/tablerowresize/utils.ts#L104)

#### Parameters

* `value: string | number`

#### Returns

* `string | null`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
