Skip to content

BlockSuite API Documentation / @blocksuite/presets / CommentManager

Class: CommentManager

Constructors

new CommentManager(host)

new CommentManager(host): CommentManager

Parameters

host: EditorHost

Returns

CommentManager

Source

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

Properties

host

readonly host: EditorHost

Source

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

Accessors

_command

get private _command(): CommandManager

Returns

CommandManager

Source

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


commentsMap

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

Returns

Map<Map<unknown>>

Source

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

Methods

addComment()

addComment(selection, payload): Comment

Parameters

selection: TextSelection

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

Returns

Comment

Source

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


getComments()

getComments(): Comment[]

Returns

Comment[]

Source

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


parseTextSelection()

parseTextSelection(selection): null | Object

Parameters

selection: TextSelection

Returns

null | Object

Source

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