RemoveReplies
function RemoveReplies(nPos: Number = 0, nCount: Number = 1, bRemoveAll: boolean = false): ApiComment
Description
Removes the specified comment replies.
Parameters
- nPos
Number
0 The position of the first comment reply to remove.
- nCount
Number
1 A number of comment replies to remove.
- bRemoveAll
boolean
false Specifies whether to remove all comment replies or not.
Returns
ApiComment
Try It
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is just a sample text");
Api.AddComment(oParagraph, "comment", "John Smith");
var aComments = oDocument.GetAllComments();
aComments[0].AddReply("reply1", "Mark Potato", "uid-2", 0);
aComments[0].RemoveReplies();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("The comment replies were removed");
oDocument.Push(oParagraph);