Javascript: TableOfContents.setTitle Method
Description
Sets a title for the table of contents. An empty string indicates that the table of contents has no title.
Syntax
<void> TableOfContents.setTitle(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| value | The property value. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates TableOfContents.setTitle in a practical document-editing workflow. It sets a title for the table of contents. An empty string indicates that the table of contents has no title.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureTitle(tableOfContents) {
tableOfContents.setTitle(
"Quarterly report",
function() {
console.log("set title completed.");
},
onTxError
);
}