API 参考

@univerjs/docs-thread-comment

本 API 页面目前提供英文正文。代码签名与标识符不随界面语言变化。

Model commands and Facade APIs for comments anchored to fixed document text ranges. This package has no UI dependency and can run in Node.js.

TypeScript
import { UniverDocsThreadCommentPlugin } from '@univerjs/docs-thread-comment'import '@univerjs/docs-thread-comment/facade'univer.registerPlugin(UniverDocsThreadCommentPlugin)const range = univerAPI.getActiveDocument()?.getTextRange(0, 12)await range?.createCommentAsync('Verify this introduction.', { id: 'review-intro' })

The Facade entry adds createCommentAsync(), getComments(), and listCommentsAsync() to FDocumentTextRange. Add @univerjs/docs-thread-comment-ui when menus, decorations, and the shared comment panel are required.

Entry Points

  • Facade: @univerjs/docs-thread-comment/facade

你觉得这篇文档如何?

© 2026 DreamNum Co., Ltd.