TableOfContentsInfo Object
Description
Information about a table of contents. Is needed by the event argument class TableOfContentsEventArgs.
Syntax
{
hasLinks: <boolean>,
hasPageNumbers: <boolean>,
hasRightAlignedPageNumbers: <boolean>,
highlightColor: <string>,
highlightMode: <string>,
id: <Number>,
length: <number>,
maximumStructureLevel: <number>,
minimumStructureLevel: <number>,
name: <string>,
number: <number>,
start: <number>
}Examples
The following example demonstrates TableOfContentsInfo in a practical document-editing workflow. Information about a table of contents. Is needed by the event argument class TableOfContentsEventArgs.
function inspectTableOfContentsInfo(tableOfContentsInfo) {
console.log("has links:", tableOfContentsInfo.hasLinks);
console.log("has page numbers:", tableOfContentsInfo.hasPageNumbers);
console.log("has right aligned page numbers:", tableOfContentsInfo.hasRightAlignedPageNumbers);
console.log("highlight color:", tableOfContentsInfo.highlightColor);
}Members
Properties
| Property | Description |
|---|---|
| hasLinks | Specifies whether each entry in the table of contents is a DocumentLink with a corresponding DocumentTarget. |
| hasPageNumbers | Specifies whether the table of contents contains page numbers. |
| hasRightAlignedPageNumbers | Specifies whether the page numbers in the table of contents are right-aligned. |
| highlightColor | The highlight color for the table of contents. |
| highlightMode | Indicates how the text of the table of contents is highlighted. |
| id | The table of contents' identifier. |
| length | The number of characters which belong to the table of contents. |
| maximumStructureLevel | The maximum structure level for this table of contents. |
| minimumStructureLevel | The minimum structure level for this table of contents. |
| name | The table of contents' name. |
| number | The table of contents' one-based number in the document. |
| start | The one-based index of the first character which belongs to the table of contents. |