Extended comments
Description
Pastes, edits, and removes comments and replies (with user data) in a document.
Plugin type: visual, non-system.
Supported editors: documents.
Installation
Download this plugin from GitHub and install it following the desktop, on-premises, or cloud installation instructions.
Usage
- Open the Plugins tab and press Extended comments.
- Select the text you want to comment on. Enter the comment text and the author name in the fields. Define the Problem Category, Severity, and Submitted by fields for the comment and click the Comment button to add the comment into the document.
- All the document comments will be displayed in the lower plugin window.
- To delete any comment, select it in the lower plugin window and click the Delete button.
- To reply to any comment, select it in the lower plugin window and click the Add reply button. Enter a reply text, check if the comment is accepted or not, and click the Reply button.
- To edit any comment, click the Edit button, enter new text or change the comment properties, and click the Ok button.
Plugin structure
Repository on GitHub: https://github.com/ONLYOFFICE/sdkjs-plugins/tree/master/example_extended_comments.
config.json, index.html, and code.js
Icons
Third-party services:
- jQuery - a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. License: MIT License.
- Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options. License: MIT.
Config
{
"name": "Extended comments",
"guid": "asc.{91EAC419-EF8B-440C-A960-B451C7DF3A37}",
"variations": [
{
"description": "Extended comments",
"url": "index.html",
"icons": ["resources/light/icon.png", "resources/light/icon@2x.png"],
"icons2": [
{
"style": "light",
"100%": {
"normal": "resources/light/icon.png"
},
"125%": {
"normal": "resources/light/icon@1.25x.png"
},
"150%": {
"normal": "resources/light/icon@1.5x.png"
},
"175%": {
"normal": "resources/light/icon@1.75x.png"
},
"200%": {
"normal": "resources/light/icon@2x.png"
}
},
{
"style": "dark",
"100%": {
"normal": "resources/dark/icon.png"
},
"125%": {
"normal": "resources/dark/icon@1.25x.png"
},
"150%": {
"normal": "resources/dark/icon@1.5x.png"
},
"175%": {
"normal": "resources/dark/icon@1.75x.png"
},
"200%": {
"normal": "resources/dark/icon@2x.png"
}
}
],
"isViewer": false,
"EditorsSupport": ["word"],
"isVisual": true,
"isModal": false,
"isInsideMode": true,
"initDataType": "none",
"initData": "",
"buttons": [],
"events": ["onAddComment", "onRemoveComment", "onChangeCommentData"]
}
]
}
Methods and events
- button
- init
- onAddComment
- onChangeCommentData
- onRemoveComment
- executeMethod ("AddComment")
- executeMethod ("ChangeComment")
- executeMethod ("GetAllComments")
- executeMethod ("MoveToComment")
- executeMethod ("RemoveComments")
Support
If you want to request a feature or report a bug regarding this plugin, use the issues section on GitHub.