Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("GetAllComments", callback)

Description

Defines the method that allows getting all the comments from the document.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("GetAllComments");
Returns

The method returns an array of comment objects containing the comment data in the following form:

{
    "Id": "1_631",
    "Data": {
        "UserName": "John Smith",
        "Text": "comment",
        "Time": "1662737941471",
        "Solved": true,
        "Replies": [{"UserName": "Mark Potato", "Text": "reply 1", "Time": "1662740895892", "Solved": false}]
    }
}
Parameters
Parameter Description Type
Id The comment ID. string "1_631"
Data An object which contains the comment data:
  • UserName - the comment author,
    type: string,
    example: "John Smith";
  • Text - the comment text,
    type: string,
    example: "comment";
  • Time - the time when the comment was posted (in milliseconds),
    type: string,
    example: "1662737941471";
  • Solved - specifies if the comment is resolved (true) or not (false),
    type: boolean,
    example: true;
  • Replies - an array containing the comment replies represented as the oCommentData objects,
    type: array of objects.
object