Module

table/tablecaption/utils

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

module

Filtering

Functions

  • getCaptionFromModelSelection( selection ) → Element | null

    Returns the caption model element for a model selection. Returns null if the selection has no caption element ancestor.

    Parameters

    selection : Selection | DocumentSelection

    The selection checked for caption presence.

    Returns

    Element | null
  • getCaptionFromTableModelElement( tableModelElement ) → Element | null

    Returns the caption model element from a given table element. Returns null if no caption is found.

    Parameters

    tableModelElement : Element

    Table element in which we will try to find a caption element.

    Returns

    Element | null
  • getSelectionAffectedTable( position ) → Element

    Depending on the position of the selection we either return the table under cursor or look for the table higher in the hierarchy.

    Parameters

    position : Position

    Returns

    Element
  • isTable( modelElement ) → Boolean

    Checks if the provided model element is a table.

    Parameters

    modelElement : Element

    Element to check if it is a table.

    Returns

    Boolean
  • matchTableCaptionViewElement( element ) → Object | null

    Matcher pattern. Checks if a given element is a caption.

    There are two possible forms of the valid caption:

    • A <figcaption> element inside a <figure class="table"> element.
    • A <caption> inside a .

    Parameters

    element : Element

    Returns

    Object | null

    Returns the object accepted by Matcher or null if the element cannot be matched.