@univerjs-pro/slides-thread-comment
v1.0.3
Published
Thread comment integration for Univer Slides.
Readme
@univerjs-pro/slides-thread-comment
@univerjs-pro/slides-thread-comment adds page- and element-anchored thread comments and facade methods to Univer Slides.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
| --- | --- | :---: | :---: | :---: |
| @univerjs-pro/slides-thread-comment | UniverProSlidesThreadComment | No | No | Yes |
Installation
pnpm add @univerjs-pro/slides-thread-comment
# or
npm install @univerjs-pro/slides-thread-commentKeep all @univerjs/* and @univerjs-pro/* packages on the same version.
Usage
Register UniverSlidesThreadCommentPlugin after the Univer Slides and thread comment plugins.
import '@univerjs-pro/slides-thread-comment/facade';
const slide = univerAPI.getActivePresentation()?.getSlideByIndex(0);
await slide?.createPositionCommentAsync({ x: 0.5, y: 0.25 }, 'Review this area.');
const chart = slide?.getCharts()[0];
if (chart) {
await slide?.createElementCommentAsync(chart.getElementId(), 'Verify the chart source.');
}Integration Notes
- Keep all
@univerjs/*and@univerjs-pro/*packages on the same version. - Import
@univerjs-pro/slides-thread-comment/facadewhen using the package through Univer Facade APIs.
