Along with ONLYOFFICE Docs v6.3 release, we updated our API. In this post, you’ll find a brief overview of what’s new.
Work with favorites
Starting from v6.3, ONLYOFFICE allows adding a file to the favorites folder right from the editor. Use our API to implement it too:
The favorite parameter in the document info. If the parameter is undefined or absent from the config, the icon is not displayed on the header at all.
If it is set to true — the icon is clicked and the file is added to Favorites.
If it is set to false, the icon is not clicked and the file is not added to Favorites.
onMetaChange event — this function is called when the meta information of the document is changed, for example, a user clicks on the Mark as Favorite icon.
setFavorite method — this method is called after onMetaChange event to indicate the file status (faved or not) has been changed. For example, when the file is added to Favorites from the document management system, it makes the icon clicked in the editors.
Please note that adding files to favorites should be also supported in your DMS.
Setting names for anonymous users
When an anonymous user opens a file for co-editing, it’s now possible to request their name to display it to other users:
You can also add a postfix to such names. For example, Elizabeth (guest).
To implement this, use the anonymous parameter in the editors’ config.
Customizing the editors
Use hideRulers parameter in the editors’ config to define whether the rulers should be displayed or not.
Document permissions updates
- Use permissions.reviewGroups instead of customization.reviewPermissions. reviewGroups contains a list of groups, changes from which the current user can accept/reject.
- Use editCommentAuthorOnly and deleteCommentAuthorOnly to allow users to edit and delete only their own comments.