RequestCommentCallback Function
Description
Callback function for requests retrieving a CommentedText object from a comment collection.
Syntax
function(<CommentedText> comment)Examples
The following example demonstrates RequestCommentCallback in a practical document-editing workflow. Callback function for requests retrieving a CommentedText object from a comment collection.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function requestCommentCallback(comment) {
console.log("comment:", comment);
}
TXTextControl.textParts.getMainText(function(mainText) {
const comments = mainText.comments;
comments.getItem(requestCommentCallback, onTxError);
}, onTxError);