Report an issue
Module

table/commands/utils

@ckeditor/ckeditor5-table/src/commands/utils

module

Filtering

Functions

  • createEmptyTableCell( writer, insertPosition, attributes )

    static

    Common method to create empty table cell - it will create proper model structure as table cell must have at least one block inside.

    Parameters

    writer : Writer

    Model writer.

    insertPosition : Position

    Position at which table cell should be inserted.

    attributes : Object

    Element's attributes.

  • findAncestor( parentName, position ) → Element | DocumentFragment

    static

    Returns the parent element of given name. Returns undefined if position is not inside desired parent.

    Parameters

    parentName : String

    Name of parent element to find.

    position : Position | Position

    Position to start searching.

    Returns

    Element | DocumentFragment
  • updateNumericAttribute( key, value, item, writer, defaultValue )

    static

    A common method to update the numeric value. If a value is the default one, it will be unset.

    Parameters

    key : String

    Attribute key.

    value : *

    The new attribute value.

    item : Item

    Model item on which the attribute will be set.

    writer : Writer
    defaultValue : *

    Default attribute value. If a value is lower or equal, it will be unset.