The rich editor's room for a Yjs copy: the binding, the others' carets under the names the room gives, suggesting as this person, and the open threads marked. useRoomEditing uses it over a y-partyserver room; any other provider (or two copies in one page) can use it directly.
useRoomEditing
(options: RoomEditingOptions): RoomEditing
usePending
(editor: Editor | null): number
The suggestions waiting in an editor's text, counted again on each change.
CSS variables
Variable
Default
--who
var(--series-1)
--who-text
var(--series-text-1)
Parts and data attributes
Class
Is
.cap-collab-actions
its own class
.cap-collab-bar
its own class
.cap-collab-caret
the root
.cap-collab-caret-name
a part
.cap-collab-caret-selection
a part
.cap-collab-comment
its own class
.cap-collab-comment-body
its own class
.cap-collab-comment-form
its own class
.cap-collab-comment-meta
its own class
.cap-collab-line
its own class
.cap-collab-mark
its own class
.cap-collab-note
its own class
.cap-collab-people
its own class
.cap-collab-person
its own class
.cap-collab-resolved
its own class
.cap-collab-stack
its own class
.cap-collab-suggestion
its own class
.cap-collab-suggestion-text
its own class
.cap-collab-suggestions
its own class
.cap-collab-thread
its own class
.cap-collab-thread-comments
its own class
.cap-collab-thread-quote
its own class
Attribute
Values
data-active
present or absent
data-suggestion
modification
data-who
01234567
State
Read from
:focus-visible
the platform
Accessibility
Key
Does
Tab
Moves through the bar (Editing, Suggesting), the text, then the panels' fields and buttons
Left arrow, Right arrow (bar)
Changes between Editing and Suggesting
Enter (comment field)
A new line; Send posts it
Everything in the text is the rich editor's keyboard.
The bar's line ("Only you are here.", "Sam Lee is here too.", Offline, Connecting) is a status region. The others' avatars are a group named "Also here: …".
Carets are drawn decorations; the names are in the bar's line, so nothing depends on seeing a caret.
Suggestions and comments are listed in panels, in reading order, with who and when; Accept, Reject, Resolve and Delete are buttons with names. A thread chosen in the text takes focus in its panel.