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.
Please note that the document commenting will only be available for the document editor if the mode parameter is set to edit.
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.
"document": {
"permissions": {
"editCommentAuthorOnly": true
...
},
...
},
...
});
If you want to allow deleting comments only by their authors, set the parameter in the permissions section of the editor initialization to true.
-
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:
The original comment format looks as follows:
${author1}:
comment
${author2}:
reply1
${author2}:
- 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.