Commenting

    In order to enable the comment option, the parameter in the permissions section of the document initialization must be set to true. The document side bar will contain the Comment menu option.

    In case the edit parameter is set to true and the comment parameter is also set to true, the user will be able to edit the document and comment.

    Commenting

    Please note that the document commenting will only be available for the document editor if the mode parameter is set to edit.

    1. If you want to allow editing comments only by their authors, set the editCommentAuthorOnly parameter in the permissions section of the editor initialization to true.

      1. "document": {
      2. "permissions": {
      3. "editCommentAuthorOnly": true
      4. ...
      5. },
      6. ...
      7. },
      8. ...
      9. });
    2. If you want to allow deleting comments only by their authors, set the parameter in the permissions section of the editor initialization to true.

    1. If the commentGroups parameter is specified in the editor config, the access rights to viewing, editing and/or removing all comments are disabled. Otherwise, if the current user does not belong to any of the groups, he or she can edit, remove and/or view comments of all groups.

      • “edit”: [“Group2”, “”] means that the user can edit comments made by users from Group2 and users who do not belong to any of the groups (for example, the document that is commented in third-party editors).
      • “remove”: [“”] means that the user can remove comments made by someone who belongs to none of these groups (for example, the document that is commented in third-party editors).
      • “view”: “” means that the user can view comments made by any user.

    To display ONLYOFFICE spreadsheet comments in other editors correctly, all the comments are saved in two formats - original and threaded:

    1. The original comment format looks as follows:

      1. ${author1}:
      2. comment
      3. ${author2}:
      4. reply1
      5. ${author2}:

    2. To convert the original comments format into the threaded comments, the “${author}:\n” string is deleted if the comment starts with it.
    • If there are comments in the original ONLYOFFICE format only, they are converted into threaded comments.