Module

table/converters/downcast

@ckeditor/ckeditor5-table/src/converters/downcast

module

Filtering

Functions

  • convertParagraphInTableCell( modelElement, conversionApi ) → ContainerElement | undefined

    Overrides paragraph inside table cell conversion.

    This converter:

    • should be used to override default paragraph conversion in the editing view.
    • It will only convert placed directly inside .
    • For a single paragraph without attributes it returns <span> to simulate data table.
    • For all other cases it returns <p> element.

    Parameters

    modelElement : Element
    conversionApi : DowncastConversionApi

    Returns

    ContainerElement | undefined
  • downcastInsertCell() → function

    Model table cell element to view <td> or <th> element conversion helper.

    This conversion helper will create proper <th> elements for table cells that are in the heading section (heading row or column) and <td> otherwise.

    Returns

    function

    Conversion helper.

  • downcastInsertRow() → function

    Model row element to view <tr> element conversion helper.

    This conversion helper creates the whole <tr> element with child elements.

    Returns

    function

    Conversion helper.

  • downcastInsertTable( options = { options.asWidget } ) → function

    Model table element to view table element conversion helper.

    This conversion helper creates the whole table element with child elements.

    Parameters

    options : Object
    Properties
    options.asWidget : Boolean

    If set to true, the downcast conversion will produce a widget.

    Returns

    function

    Conversion helper.

  • downcastRemoveRow() → function

    Conversion helper that acts on a removed row.

    Returns

    function

    Conversion helper.

  • downcastTableHeadingColumnsChange() → function

    Conversion helper that acts on heading column table attribute change.

    Depending on changed attributes this converter will rename <td to <th> elements or vice versa depending on the cell column index.

    Returns

    function

    Conversion helper.

  • isSingleParagraphWithoutAttributes( modelElement ) → Boolean

    Checks if given model <paragraph> is an only child of a parent (<tableCell>) and if it has any attribute set.

    The paragraph should be converted in the editing view to:

    • If returned true - to a <span class="ck-table-bogus-paragraph">
    • If returned false - to a <p>

    Parameters

    modelElement : Element

    Returns

    Boolean