Javascript: Footnote.setID Method
Description
Sets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.
Syntax
<void> Footnote.setID(<number> 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 Footnote.setID in a practical document-editing workflow. It sets a user-defined identifier. It must be a one-based value. A value of zero indicates that the footnote has no identifier.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.footnotes.elementAt(0, function(footnote) {
if (!footnote) {
console.warn("No footnote is available.");
return;
}
footnote.setID(
1,
function() {
console.log("set id completed.");
},
onTxError
);
}, onTxError);