Comments for Blocknote
Comments feature for Blocknote.
Demo
A demo is worth a thousand words
Installation
Install via YARN
Get the package
$ yarn add @defensestation/blocknote-commentsUsage
Include module at your application
import {
commentStyleSpec,
CommentToolbarController,
CreateCommentButton,
} from "@defensestation/blocknote-comments";Create schema with comment style spec.
const schema = BlockNoteSchema.create({
styleSpecs: {
// Adds all default styles.
...defaultStyleSpecs,
comment: commentStyleSpec,
},
});Add comment button in toolbar.
const CustomToolbar = () => (<FormattingToolbarController
formattingToolbar={() => (
<FormattingToolbar>
<CreateCommentButton key={"createCommentButtin"} />
</FormattingToolbar>
)}
/>)Add comment controller.
<BlockNoteView formattingToolbar={false} editor={editor}>
<CustomToolbar />
<CommentToolbarController />
</BlockNoteView>On this page
Languages
TypeScript86.6%JavaScript6.2%CSS5.8%HTML1.5%
Latest Release
1.0.0April 20, 2024Apache License 2.0
Created April 13, 2024
Updated March 20, 2026
