WEBINARNo AI, your AI, or a team of agents: Introducing CKEditor Editing Toolkit. REGISTER NOW!
Sign up (with export icon)

table/tablerowresize/utils

Api-module iconmodule

Functions

  • Chevron-right icon

    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.

    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.

  • Chevron-right icon

    getTableRows( table ) → Array<ModelElement>
    internal

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

    Parameters

    table: ModelElement

    Returns

    Array<ModelElement>
  • Chevron-right icon

    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.

    Parameters

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

    Returns

    string | null
  • Chevron-right icon

    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).

    Parameters

    value: string | number | undefined

    Returns

    boolean
  • Chevron-right icon

    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.

    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
  • Chevron-right icon

    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.

    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
  • Chevron-right icon

    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.

    Parameters

    value: string | number

    Returns

    string | null