Module

image/imagecaption/utils

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

module

Filtering

Functions

  • captionElementCreator( view, placeholderText ) → function

    static

    Returns a function that creates a caption editable element for the given Document.

    Parameters

    view : View
    placeholderText : String

    The text to be displayed when the caption is empty.

    Returns

    function
  • getCaptionFromImage( imageModelElement ) → Element | null

    static

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

    Parameters

    imageModelElement : Element

    Returns

    Element | null
  • isCaption( viewElement ) → Boolean

    static

    Returns true if a given view element is the image caption editable.

    Parameters

    viewElement : Element

    Returns

    Boolean
  • matchImageCaption( element ) → Object | null

    static

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

    Parameters

    element : Element

    Returns

    Object | null

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