BlockSuite API Documentation / @blocksuite/presets / CommentManager
Class: CommentManager
Constructors
new CommentManager()
new CommentManager(
host
):CommentManager
Parameters
• host: EditorHost
Returns
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
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
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
|object
Parameters
• selection: TextSelection
Returns
null
| object
Defined in
packages/presets/src/fragments/comment/comment-manager.ts:103