table/tablecaption/utils
module
Functions
-
getCaptionFromModelSelection( selection ) → null | ModelElement
internalmodule:table/tablecaption/utils~getCaptionFromModelSelection
Returns the caption model element for a model selection. Returns
null
if the selection has no caption element ancestor.Parameters
selection : ModelDocumentSelection
The selection checked for caption presence.
Returns
null | ModelElement
-
getCaptionFromTableModelElement( tableModelElement ) → null | ModelElement
internalmodule:table/tablecaption/utils~getCaptionFromTableModelElement
Returns the caption model element from a given table element. Returns
null
if no caption is found.Parameters
tableModelElement : ModelElement
Table element in which we will try to find a caption element.
Returns
null | ModelElement
-
isTable( modelElement ) → boolean
internalmodule:table/tablecaption/utils~isTable
Checks if the provided model element is a
table
.Parameters
modelElement : null | ModelElement | ModelDocumentFragment
Element to check if it is a table.
Returns
boolean
-
matchTableCaptionViewElement( element ) → null | object
internalmodule:table/tablecaption/utils~matchTableCaptionViewElement
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 : ViewElement
Returns
null | object
Returns the object accepted by
Matcher
ornull
if the element cannot be matched.
- A