BlockSuite API Documentation / @blocksuite/presets / CommentManager
Class: CommentManager
Constructors
new CommentManager()
new CommentManager(
host
):CommentManager
Parameters
• host: EditorHost
Returns
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
Source
packages/presets/src/fragments/comment/comment-manager.ts:166
commentsMap
Returns
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
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