ApiComment

class ApiComment

Description

Class representing a comment.

Instance Methods

GetClassType(): comment

Returns a type of the ApiComment class.

GetText(): string

Returns the comment text.

SetText(text)

Sets the comment text.

GetId(): string

Returns the current comment ID.

GetAuthorName(): string

Returns the comment author's name.

SetAuthorName(sAuthorName)

Sets the comment author's name.

GetUserId(): string

Returns the user ID of the comment author.

SetUserId(sUserId)

Sets the user ID to the comment author.

IsSolved(): boolean

Checks if a comment is solved or not.

SetSolved(bSolved)

Marks a comment as solved.

GetTimeUTC(): Number

Returns the timestamp of the comment creation in UTC format.

SetTimeUTC(nTimeStamp)

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)

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

GetQuoteText(): String | "null"

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)

Adds a reply to a comment.

RemoveReplies(nPos, nCount, bRemoveAll)

Removes the specified comment replies.

Delete()

Deletes the ApiComment object.

Instance Properties

Textstring

Returns or sets the comment text.

Idstring

Returns the current comment ID.

AuthorNamestring

Returns or sets the comment author's name.

UserIdstring

Returns or sets the user ID of the comment author.

Solvedboolean

Checks if a comment is solved or not or marks a comment as solved.

TimeUTCnumber | string

Returns or sets the timestamp of the comment creation in UTC format.

Timenumber | string

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

QuoteTextstring

Returns the quote text of the current comment.

RepliesCountNumber

Returns a number of the comment replies.

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