Get Started
Plugins
Macros
More information

Extended conmments

Description

Pastes, edits and removes comments and replies (with user data) in a document.

Plugin type: visual, non-system.

Supported editors: documents.

ExtendedComments
Installation

Download this plugin from GitHub and install it following the desktop, on-premises, or cloud installation instructions.

Usage
  1. Open the Plugins tab and press Extended comments.
  2. 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.
  3. All the document comments will be displayed in the lower plugin window.
  4. To delete any comment, select it in the lower plugin window and click the Delete button.
  5. 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.
  6. 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/develop/example_extended_comments.

  1. config.json, index.html and code.js
  2. Icons
  3. 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 (http://jquery.com/). 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 (https://select2.org/). License: MIT.
Config
{
    "name" : "Extended comments",
    "guid" : "asc.{91EAC419-EF8B-440C-A960-B451C7DF3A37}",

    "variations" : [
        {
            "description" : "Extended comments",
            "url"         : "index.html",

            "icons"           : ["resources/img/icon.png", "resources/img/icon@2x.png", "resources/img/icon2.png", "resources/img/icon2@2x.png"],
            "isViewer"        : false,
            "EditorsSupport"  : ["word"],

            "isVisual"        : true,
            "isModal"         : false,
            "isInsideMode"    : true,

            "initDataType"    : "",
            "initData"        : "",

            "isUpdateOleOnResize" : false,

            "buttons"         : [],
            "events" : ["onAddComment", "onRemoveComment", "onChangeCommentData"]

        }
    ]
}
Methods and events

The main plugin code is located here.

Support

If you want to request a feature or report a bug regarding this plugin, use the issues section on GitHub.