Module

image/imagecaption/utils

@ckeditor/ckeditor5-image/src/imagecaption/utils

module

Filtering

Functions

  • getCaptionFromImageModelElement( imageModelElement ) → Element | null

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

    Parameters

    imageModelElement : Element

    Returns

    Element | null
  • getCaptionFromModelSelection( imageUtils, selection ) → Element | null

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

    Parameters

    imageUtils : ImageUtils
    selection : Selection

    Returns

    Element | null
  • matchImageCaptionViewElement( imageUtils, element ) → Object | null

    Matcher pattern. Checks if a given element is a <figcaption> element that is placed inside the image <figure> element.

    Parameters

    imageUtils : ImageUtils
    element : Element

    Returns

    Object | null

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