@univerjs/sheets-thread-comment v0.5.4


Class: FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:148

Extends

Constructors

new FTheadCommentBuilder()

new FTheadCommentBuilder(comment?): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:51

Parameters

ParameterType
comment?IThreadComment

Returns

FTheadCommentBuilder

Inherited from

FTheadCommentItem.constructor

Properties

PropertyModifierTypeInherited fromDefined in
_commentprotectedIThreadCommentFTheadCommentItem._commentsheets-thread-comment/src/facade/f-thread-comment.ts:26

Accessors

content

Get Signature

get content(): RichTextValue

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:98

Get the content of the comment

Example
const comment = univerAPI.getActiveWorkbook()
 .getSheetById(sheetId)
 .getCommentById(commentId);
const content = comment.content;
Returns

RichTextValue

The content of the comment

Inherited from

FTheadCommentItem.content


dateTime

Get Signature

get dateTime(): string

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:83

Get the date time of the comment

Example
const comment = univerAPI.getActiveWorkbook()
 .getSheetById(sheetId)
 .getCommentById(commentId);
const dateTime = comment.dateTime;
Returns

string

The date time of the comment

Inherited from

FTheadCommentItem.dateTime


id

Get Signature

get id(): string

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:113

Get the id of the comment

Example
const comment = univerAPI.getActiveWorkbook()
 .getSheetById(sheetId)
 .getCommentById(commentId);
const id = comment.id;
Returns

string

The id of the comment

Inherited from

FTheadCommentItem.id


personId

Get Signature

get personId(): string

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:68

Get the person id of the comment

Example
const comment = univerAPI.getActiveWorkbook()
 .getSheetById(sheetId)
 .getCommentById(commentId);
const personId = comment.personId;
Returns

string

The person id of the comment

Inherited from

FTheadCommentItem.personId


threadId

Get Signature

get threadId(): string

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:128

Get the thread id of the comment

Example
const comment = univerAPI.getActiveWorkbook()
 .getSheetById(sheetId)
 .getCommentById(commentId);
const threadId = comment.threadId;
Returns

string

The thread id of the comment

Inherited from

FTheadCommentItem.threadId

Methods

build()

build(): IThreadComment

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:242

Build the comment

Returns

IThreadComment

The comment

Example

const comment = univerAPI.newTheadComment()
 .setContent(univerAPI.newRichText().insertText('hello zhangsan'))
 .build();

copy()

copy(): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:143

Copy the comment

Returns

FTheadCommentBuilder

The comment builder

Example

const comment = univerAPI.getActiveWorkbook()
 .getSheetById(sheetId)
 .getCommentById(commentId);
const newComment = comment.copy();

Inherited from

FTheadCommentItem.copy


setContent()

setContent(content): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:163

Set the content of the comment

Parameters

ParameterTypeDescription
content| IDocumentBody | RichTextValueThe content of the comment

Returns

FTheadCommentBuilder

The comment builder

Example

const comment = univerAPI.newTheadComment()
 .setContent(univerAPI.newRichText().insertText('hello zhangsan'));

setDateTime()

setDateTime(date): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:197

Set the date time of the comment

Parameters

ParameterTypeDescription
dateDateThe date time of the comment

Returns

FTheadCommentBuilder

The comment builder

Example

const comment = univerAPI.newTheadComment()
 .setDateTime(new Date());

setId()

setId(id): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:212

Set the id of the comment

Parameters

ParameterTypeDescription
idstringThe id of the comment

Returns

FTheadCommentBuilder

The comment builder

Example

const comment = univerAPI.newTheadComment()
 .setId('123');

setPersonId()

setPersonId(userId): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:182

Set the person id of the comment

Parameters

ParameterTypeDescription
userIdstringThe person id of the comment

Returns

FTheadCommentBuilder

The comment builder

Example

const comment = univerAPI.newTheadComment()
 .setPersonId('123');

setThreadId()

setThreadId(threadId): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:227

Set the thread id of the comment

Parameters

ParameterTypeDescription
threadIdstringThe thread id of the comment

Returns

FTheadCommentBuilder

The comment builder

Example

const comment = univerAPI.newTheadComment()
 .setThreadId('123');

create()

static create(comment?): FTheadCommentBuilder

Defined in: sheets-thread-comment/src/facade/f-thread-comment.ts:149

Create a new FTheadCommentItem

Parameters

ParameterTypeDescription
comment?IThreadCommentThe comment

Returns

FTheadCommentBuilder

A new instance of FTheadCommentItem

Example

const comment = univerAPI.newTheadComment();

Overrides

FTheadCommentItem.create