@univerjs-pro/shape-thread-comment
v1.0.3
Published
Thread comment integration for Univer Shapes.
Readme
@univerjs-pro/shape-thread-comment
@univerjs-pro/shape-thread-comment provides facade methods for comments anchored to images, charts, and Shapes in Sheets, Docs, Slides, and Boards.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
| --- | --- | :---: | :---: | :---: |
| @univerjs-pro/shape-thread-comment | UniverProShapeThreadComment | No | No | Yes |
Installation
pnpm add @univerjs-pro/shape-thread-comment
# or
npm install @univerjs-pro/shape-thread-commentKeep all @univerjs/* and @univerjs-pro/* packages on the same version.
Usage
Register UniverShapeThreadCommentPlugin with the Univer thread comment plugin.
Import the Facade entry to add createCommentAsync, getComments, and listCommentsAsync to supported element Facades.
import '@univerjs-pro/shape-thread-comment/facade';
const image = univerAPI.getActiveWorkbook()?.getActiveSheet()?.getImages()[0];
await image?.createCommentAsync('Replace this image.', { id: 'review-image-1' });Integration Notes
- Keep all
@univerjs/*and@univerjs-pro/*packages on the same version. - Import
@univerjs-pro/shape-thread-comment/facadewhen using the package through Univer Facade APIs.
