AddCommentCallback Function
Description
Callback function for functions which add a comment.
Syntax
function(<CommentCallbackData> response)Examples
The following example demonstrates AddCommentCallback in a practical document-editing workflow. Callback function for functions which add a comment.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function addCommentCallback(response) {
console.log("response:", response);
}
TXTextControl.textParts.getMainText(function(mainText) {
const comments = mainText.comments;
comments.add("Please review this section.", addCommentCallback, onTxError);
}, onTxError);