Search

CollaborationCursor

VersionDownloads

This extension adds information about all connected users (like their name and a specified color), their current cursor position and their text selection (if there’s one).

Open this page in multiple browser windows to test it.

Pro Extension

We kindly ask you to sponsor our work when using this extension in production.

Installation

# with npm
npm install @tiptap/extension-collaboration-cursor

# with Yarn
yarn add @tiptap/extension-collaboration-cursor

This extension requires the Collaboration extension.

Settings

OptionTypeDefaultDescription
providerObjectnullA Y.js network connection, for example a y-websocket instance.
userObject{ user: null, color: null }Attributes of the current user, assumes to have a name and a color, but can be used with any attribute.
renderFunctionA render function for the cursor, look at the extension source code for an example.

Commands

CommandParametersDescription
userattributesAn object with the attributes of the current user, by default it expects a name and a color.

Source code

packages/extension-collaboration-cursor/

Usage

Public

The content of this editor is shared with other users.