RemoveReplies

function RemoveReplies(nPos: Number = 0, nCount: Number = 1, bRemoveAll: boolean = false): ApiComment

Description

Removes the specified comment replies.

Parameters

nPosNumberdefault: 0

The position of the first comment reply to remove.

nCountNumberdefault: 1

A number of comment replies to remove.

bRemoveAllbooleandefault: 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);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).