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

table/utils/resize

Api-module iconmodule

Constants

Functions

  • Chevron-right icon

    fitResizerToTable( view, viewResizer, type ) → void
    internal

    Sets the side styles of a column or a row resizer handle, so it stretches over the whole height or width of the table.

    Parameters

    view: EditingView

    The editing view.

    viewResizer: ViewElement

    The resizer handle element.

    type: 'row' | 'column'

    Whether it is a column or a row resizer.

    Returns

    void
  • Chevron-right icon

    registerResizerInserter( editor, className ) → void
    internal

    Registers a listener ensuring that each table cell has a column or a row resizer handle.

    Parameters

    editor: Editor

    The editor instance.

    className: string

    The class of the resizer handle element.

    Returns

    void
  • Chevron-right icon

    resetResizerStyles( view, viewResizer, type ) → void
    internal

    Removes the side styles set by fitResizerToTable().

    Parameters

    view: EditingView

    The editing view.

    viewResizer: ViewElement

    The resizer handle element.

    type: 'row' | 'column'

    Whether it is a column or a row resizer.

    Returns

    void
  • Chevron-right icon

    toPrecision( value ) → number
    internal

    Rounds the provided value to a fixed-point number with defined number of digits after the decimal point.

    Parameters

    value: string | number

    A number to be rounded.

    Returns

    number

    The rounded number.

  • Chevron-right icon

    toggleResizingCursor( className, cursor, isActive ) → void
    internal

    Shows the resizing cursor everywhere while a column or a row is resized, also when the editor is in a shadow root.

    The class goes to the <body> and is styled by a rule adopted into the document, as a theme stylesheet loaded into a shadow root cannot style the <body>. The cursor of the shadow host is inherited by the editor content inside.

    Parameters

    className: string

    The class that sets the cursor.

    cursor: string

    The cursor to show.

    isActive: boolean

    Whether the resizing is in progress.

    Returns

    void
  • Chevron-right icon

    toggleResizingDisabledClass( view, className, isResizingAllowed ) → void
    internal

    Toggles the class that hides the column or the row resizer handles (through CSS) on all editing roots.

    Parameters

    view: EditingView

    The editing view.

    className: string

    The class that hides the resizer handles.

    isResizingAllowed: boolean

    Whether the resizing is allowed. The class is added when it is not.

    Returns

    void