+
+
Editor
+
+ ({
+ text: `${user.username} (${
+ user.role === "editor" ? "Editor" : "Commenter"
+ })`,
+ icon: null,
+ onClick: () => {
+ setActiveUser(user);
+ },
+ isSelected: user.id === activeUser.id,
+ }))}
+ />
+
+ {/* Because we set `renderEditor` to false, we can now manually place
+ `BlockNoteViewEditor` (the actual editor component) in its own
+ section below the user settings select. */}
+
+ {/* Since we disabled rendering of comments with `comments={false}`,
+ we need to re-add the floating composer, which is the UI element that
+ appears when creating new threads. */}
+
+
+
+ {/* We also place the `ThreadsSidebar` component in its own section,
+ along with settings for filtering and sorting. */}
+
+
Comments
+
+ setCommentFilter("all"),
+ isSelected: commentFilter === "all",
+ },
+ {
+ text: "Open",
+ icon: null,
+ onClick: () => setCommentFilter("open"),
+ isSelected: commentFilter === "open",
+ },
+ {
+ text: "Resolved",
+ icon: null,
+ onClick: () => setCommentFilter("resolved"),
+ isSelected: commentFilter === "resolved",
+ },
+ ]}
+ />
+ setCommentSort("position"),
+ isSelected: commentSort === "position",
+ },
+ {
+ text: "Recent activity",
+ icon: null,
+ onClick: () => setCommentSort("recent-activity"),
+ isSelected: commentSort === "recent-activity",
+ },
+ {
+ text: "Oldest",
+ icon: null,
+ onClick: () => setCommentSort("oldest"),
+ isSelected: commentSort === "oldest",
+ },
+ ]}
+ />
+
+
+
+