ApiComment

class ApiComment

Description

Class representing a comment.

Instance Methods

GetClassType(): comment

Returns a type of the ApiComment class.

GetId(): string

Returns the current comment ID.

GetText(): string

Returns the comment text.

SetText(sText): ApiComment

Sets the comment text.

GetAuthorName(): string

Returns the comment author's name.

SetAuthorName(sAuthorName): ApiComment

Sets the comment author's name.

GetUserId(): string

Returns the user ID of the comment author.

SetUserId(sUserId): ApiComment

Sets the user ID to the comment author.

IsSolved(): boolean

Checks if a comment is solved or not.

SetSolved(bSolved): ApiComment

Marks a comment as solved.

GetTimeUTC(): Number

Returns the timestamp of the comment creation in UTC format.

SetTimeUTC(nTimeStamp): ApiComment

Sets the timestamp of the comment creation in UTC format.

GetTime(): Number

Returns the timestamp of the comment creation in the current time zone format.

SetTime(nTimeStamp): ApiComment

Sets the timestamp of the comment creation in the current time zone format.

GetQuoteText(): Number

Returns the quote text of the current comment.

GetRepliesCount(): Number

Returns a number of the comment replies.

GetReply(nIndex): ApiCommentReply

Returns the specified comment reply.

AddReply(sText, sAuthorName, sUserId, nPos): ApiComment

Adds a reply to a comment.

RemoveReplies(nPos, nCount, bRemoveAll): ApiComment

Removes the specified comment replies.

Delete(): boolean

Deletes the current comment from the document.

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).