Collaboration Caret

Renders the cursors and selections of the other collaborators from the provider awareness.

UIrich-text-editor-collaboration-caretView JSON

The extension publishes the local user through the provider awareness, so the presence bar reads the same record. It needs a provider with awareness enabled: create the provider before mounting the editor, and pass a `name` and a `color` so the cursor label is readable.

Preview

Installation

Add the item with the shadcn CLI, or copy the source manually.

pnpm dlx shadcn@latest add litingyes/blocove/rich-text-editor-collaboration-caret

Requires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.

Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/rich-text-editor-collaboration-caret

This example also uses: rich-text-editor-collaboration-caretrich-text-editor-collaborationrich-text-editor-textrich-text-editor-paragraphrich-text-editor-hard-break

pnpm dlx shadcn@latest add litingyes/blocove/rich-text-editor-collaboration-caret litingyes/blocove/rich-text-editor-collaboration litingyes/blocove/rich-text-editor-text litingyes/blocove/rich-text-editor-paragraph litingyes/blocove/rich-text-editor-hard-break
Typography is provided by shadcn/typeset. Copy typeset.css next to your stylesheet, import it after Tailwind and add the .typeset-docs preset. See the Rich text editor setup.

API Reference

Props accepted by the exported components.

EditorCollaborationCaret

Draws the cursors and the selections of the other peers from the provider awareness.

PropTypeDefault
providerCollaborationProviderrequired
userCollaborationUserrequired
render(user) => HTMLElementBuilt-in caret
selectionRender(user) => DecorationAttrsBuilt-in selection