Skip to content

BlockSuite API Documentation / @blocksuite/presets / CommentManager

Class: CommentManager

Constructors

new CommentManager()

new CommentManager(host): CommentManager

Parameters

host

EditorHost

Returns

CommentManager

Defined in

packages/presets/src/fragments/comment/comment-manager.ts:36

Properties

host

readonly host: EditorHost

Defined in

packages/presets/src/fragments/comment/comment-manager.ts:36

Accessors

commentsMap

Get Signature

get commentsMap(): YMap<YMap<unknown>>

Returns

YMap<YMap<unknown>>

Defined in

packages/presets/src/fragments/comment/comment-manager.ts:32

Methods

addComment()

addComment(selection, payload): Comment

Parameters

selection

TextSelection

payload

Pick<CommentContent, "author" | "text">

Returns

Comment

Defined in

packages/presets/src/fragments/comment/comment-manager.ts:38


getComments()

getComments(): Comment[]

Returns

Comment[]

Defined in

packages/presets/src/fragments/comment/comment-manager.ts:64


parseTextSelection()

parseTextSelection(selection): null | { quote: string; range: CommentRange; }

Parameters

selection

TextSelection

Returns

null | { quote: string; range: CommentRange; }

Defined in

packages/presets/src/fragments/comment/comment-manager.ts:103