@univerjs-pro/docs-drawing-thread-comment
Comment integration for document images (FDocumentImage). Configure Docs images and register this plugin before opening a document.
TypeScript
import { UniverDocsDrawingThreadCommentPlugin } from '@univerjs-pro/docs-drawing-thread-comment'import '@univerjs-pro/docs-drawing-thread-comment/facade'univer.registerPlugin(UniverDocsDrawingThreadCommentPlugin)const image = univerAPI.getActiveDocument()?.getImages()[0]await image?.createCommentAsync('Add alternative text.')The plugin supplies its shared Shape/thread-comment dependencies. It has no configuration options, locales, or styles of its own. Configure comment UI and persistence through the Docs comments guide.
Facade methods
| Method | Behavior |
|---|---|
createCommentAsync(content, options?) | Creates a comment anchored to the image. Accepts plain text or a document body and optional IDs, author, attachments, and creation time. Resolves to command success; empty content throws TypeError. |
getComments() | Returns locally loaded matching comment threads. |
listCommentsAsync() | Synchronizes known threads, then returns matching comments. |
See the image Facade reference for signatures. Import @univerjs-pro/docs-drawing-thread-comment/facade to register these methods.
How is this guide?