đŸ’Ŧ Comments Plugin

Enable collaborative comments and discussions

Overview

The Comments plugin enables real-time collaborative commenting on document content. Users can add comments to specific sections, reply to comments, resolve discussions, and track all changes with contributor information.

Features

  • ✓ Real-time comments
  • ✓ Threaded discussions
  • ✓ Comment replies
  • ✓ Resolve/mark as done
  • ✓ User attribution
  • ✓ Comment threading
  • ✓ Mention notifications
  • ✓ Comment export

Installation

npm install @editora/plugin-comments

Basic Usage

import Editora from '@editora/core';
import CommentsPlugin from '@editora/plugin-comments';

const editor = new Editora('#editor');
editor.use(CommentsPlugin, {
    userId: 'user123',
    userName: 'John Doe',
    serverUrl: 'https://your-server.com/comments'
});

Comment Management

Work with comments effectively:

  1. Add Comment: Select text and add a comment
  2. Reply: Add replies to existing comments
  3. Resolve: Mark comments as resolved
  4. Filter: View all, open, or resolved comments

API Methods

  • addComment(text): Add comment to selection
  • replyToComment(id, text): Reply to existing comment
  • resolveComment(id): Mark comment as resolved
  • getComments(): Get all comments for document

Best Practices

  • Be Specific: Highlight exact text when commenting
  • Use Mentions: Tag team members using @username
  • Resolve: Mark comments as resolved when addressed
  • Threads: Keep related discussion in comment threads