table/tablecaption/utils
module
Functions
getCaptionFromModelSelection( selection ) → ModelElement | nullinternalmodule:table/tablecaption/utils~getCaptionFromModelSelectionReturns the caption model element for a model selection. Returns
nullif the selection has no caption element ancestor.Parameters
selection : ModelDocumentSelectionThe selection checked for caption presence.
Returns
ModelElement | null
getCaptionFromTableModelElement( tableModelElement ) → ModelElement | nullinternalmodule:table/tablecaption/utils~getCaptionFromTableModelElementReturns the caption model element from a given table element. Returns
nullif no caption is found.Parameters
tableModelElement : ModelElementTable element in which we will try to find a caption element.
Returns
ModelElement | null
isTable( modelElement ) → booleaninternalmodule:table/tablecaption/utils~isTableChecks if the provided model element is a
table.Parameters
modelElement : ModelElement | ModelDocumentFragment | nullElement to check if it is a table.
Returns
boolean
matchTableCaptionViewElement( element ) → object | nullinternalmodule:table/tablecaption/utils~matchTableCaptionViewElementMatcherpattern. 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 : ViewElement
Returns
object | nullReturns the object accepted by
Matcherornullif the element cannot be matched.
- A