Skip to main content
Version: Next

Comments Plugin

Contextual commenting with per-editor sidebar mounting and selection-aware comment anchors.

Installation and Import

import { CommentsPlugin } from "@editora/plugins";
// or: import { CommentsPlugin } from "@editora/plugins/comments";

Usage

const plugins = [CommentsPlugin()];

Command Matrix

ActionCommandShortcutToolbar
Create commentaddCommentNoneAdd Comment
Toggle comments paneltoggleCommentsNoneShow / Hide Comments

Config Options

This plugin does not expose plugin-level config options. Panel behavior follows active editor host layout and theme context.

Behavior

  • addComment opens panel and focuses comment input
  • Supports comments on selected text and general comments
  • toggleComments opens/closes panel without mutating content
  • Maintains selection context for comment anchoring

Multi-Instance Notes

  • Panel mounts to active editor host
  • Comment anchors and highlights stay instance-scoped

Validation Checklist

  • Panel opens in correct editor instance
  • Add-comment flow does not shake/reflow unrelated editors
  • Show/hide flow remains stable
  • Dark theme panel contrast is readable