Comment / Annotation Introduction
📊 Univer Sheet📝 Univer Doc
The Comment / Annotation plugin provides the ability to comment or annotate cells.
Installation
pnpm add @univerjs/sheets-thread-comment-base @univerjs/sheets-thread-comment @univerjs/thread-comment @univerjs/thread-comment-ui
Import
import '@univerjs/thread-comment-ui/lib/index.css';
import { IThreadCommentMentionDataService, UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
import { UniverThreadCommentPlugin } from '@univerjs/thread-comment';
import { UniverSheetsThreadCommentBasePlugin } from '@univerjs/sheets-thread-comment-base';
import { UniverSheetsThreadCommentPlugin } from '@univerjs/sheets-thread-comment';
Internationalization
import { LocaleType, Tools } from '@univerjs/core';
import ThreadCommentUIEnUS from '@univerjs/thread-comment-ui/locale/en-US';
import SheetsThreadCommentEnUS from '@univerjs/sheets-thread-comment/locale/en-US';
const univer = new Univer({
theme: defaultTheme,
locale: LocaleType.EN_US,
locales: {
[LocaleType.EN_US]: Tools.deepMerge(
ThreadCommentUIEnUS,
SheetsThreadCommentEnUS
),
},
});
Register
univer.registerPlugin(UniverThreadCommentPlugin);
univer.registerPlugin(UniverThreadCommentUIPlugin);
univer.registerPlugin(UniverSheetsThreadCommentBasePlugin);
univer.registerPlugin(UniverSheetsThreadCommentPlugin);