Collaborative editing

When the document is synced (e.g. Yjs, Hocuspocus), typing in one client can trigger suggestion UI in another. Use the shouldShow callback to suppress menus when the change came from a remote user.

shouldShow

shouldShow(transaction) is called when the extension would open or update a session. Return false to hide the menu for that transaction. With Yjs, use isChangeOrigin(transaction) from @tiptap/extension-collaboration to detect remote changes and return false so only the local user sees their suggestion UI.

Demo

Split-pane editor sharing a Yjs document — type @ in one pane, menu appears only there; the other pane does not show a menu for the same document update. See Storybook for an interactive example.