BlockSuite API Documentation / @blocksuite/presets / CommentManager
Class: CommentManager
Constructors
new CommentManager()
new CommentManager(
host
):CommentManager
Parameters
host
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 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
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
| {quote
:string
;range
:CommentRange
; }
Parameters
selection
Returns
null
| { quote
: string
; range
: CommentRange
; }
Defined in
packages/presets/src/fragments/comment/comment-manager.ts:103