Class odf.CollapsingRules
Defined in: CollapsingRules.js.
Constructor Attributes | Constructor Name and Description |
---|---|
odf.CollapsingRules(rootNode)
Defines a set of rules for how elements can be collapsed based on whether they contain ODT content (e.g.
|
Method Attributes | Method Name and Description |
---|---|
<inner> |
filterOdfNodesToRemove(node)
Returns NodeFilter value if a given node is odf node or a text node that has a odf parent.
|
<inner> |
isCollapsibleContainer(node)
Returns true if the supplied node should be automatically collapsed (i.e.
|
<inner> |
mergeChildrenIntoParent(targetNode)
Merge all child nodes into the node's parent and remove the node entirely
|
Class Detail
odf.CollapsingRules(rootNode)
Defines a set of rules for how elements can be collapsed based on whether they contain ODT content (e.g.,
text or character elements).
- Parameters:
- {!Node} rootNode
- Root text element of the odtDocument
Method Detail
<inner>
{!number}
filterOdfNodesToRemove(node)
Returns NodeFilter value if a given node is odf node or a text node that has a odf parent.
- Parameters:
- {!Node} node
- Returns:
- {!number}
<inner>
{!boolean}
isCollapsibleContainer(node)
Returns true if the supplied node should be automatically collapsed (i.e., removed) if it contains no
text or ODF character elements. The only element that should always be kept is a paragraph element.
Paragraph elements can only be deleted through merging
- Parameters:
- {!Node} node
- Returns:
- {!boolean}
<inner>
{?Node}
mergeChildrenIntoParent(targetNode)
Merge all child nodes into the node's parent and remove the node entirely
- Parameters:
- {!Node} targetNode
- Node to merge into parent
- Returns:
- {?Node} Final parent node collapsing ended at