Module

table/tableselection/croptable

@ckeditor/ckeditor5-table/src/tableselection/croptable

module

Filtering

Functions

  • cropTable( selectedTableCellsIterator, tableUtils, writer ) → Element

    static

    Returns a cropped table from the selected table cells.

    This function is to be used with the table selection.

    tableSelection.startSelectingFrom( startCell )
    tableSelection.setSelectingFrom( endCell )
    
    const croppedTable = cropTable( tableSelection.getSelectedTableCells() );

    Note: This function is also used by getSelectionAsFragment.

    Parameters

    selectedTableCellsIterator : Iterable.<Element>
    tableUtils : TableUtils
    writer : Writer

    Returns

    Element