table/tablecaption/utils
module
Functions
getCaptionFromModelSelection( selection ) → null | ModelElementinternalmodule: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
null | ModelElement
getCaptionFromTableModelElement( tableModelElement ) → null | ModelElementinternalmodule: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
null | ModelElement
isTable( modelElement ) → booleaninternalmodule:table/tablecaption/utils~isTableChecks if the provided model element is a
table.Parameters
modelElement : null | ModelElement | ModelDocumentFragmentElement to check if it is a table.
Returns
boolean
matchTableCaptionViewElement( element ) → null | objectinternalmodule: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
null | objectReturns the object accepted by
Matcherornullif the element cannot be matched.
- A