@univerjs-pro/boards-thread-comment
v1.0.3
Published
Thread comment integration for Univer Boards.
Downloads
2,431
Readme
@univerjs-pro/boards-thread-comment
@univerjs-pro/boards-thread-comment adds element- and position-anchored thread comments and facade methods to Univer Boards.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
| --- | --- | :---: | :---: | :---: |
| @univerjs-pro/boards-thread-comment | UniverProBoardsThreadComment | No | No | Yes |
Installation
pnpm add @univerjs-pro/boards-thread-comment
# or
npm install @univerjs-pro/boards-thread-commentKeep all @univerjs/* and @univerjs-pro/* packages on the same version.
Usage
Register UniverBoardsThreadCommentPlugin after the Univer Boards and thread comment plugins.
import '@univerjs-pro/boards-thread-comment/facade';
const board = univerAPI.getActiveBoard();
const shape = board?.getShapes()[0];
if (shape) {
await board?.createElementCommentAsync(shape.getId(), 'Review this Shape.');
}
await board?.createPositionCommentAsync({ x: 320, y: 180 }, 'Review this area.');Integration Notes
- Keep all
@univerjs/*and@univerjs-pro/*packages on the same version. - Import
@univerjs-pro/boards-thread-comment/facadewhen using the package through Univer Facade APIs.
