#4140·plate

Yjs: useEditorSelection() does not seem to work with YjsPlugin

Author: eriksson-danielCreated Mar 4, 2025Updated Apr 18, 2026
Labelsbugplugin:yjsready-for-human

Description

Hi! Thanks for this great framework! It's been providing lots of value to my team and our users. :)

We've run into a little problem while trying to upgrade to v44+, though: With YJsPlugin, useEditorSelection() always returns null or is not even executed

This worked fine in v43.

Reproduction URL

https://github.com/eriksson-daniel/useEditorSelection-YjsPlugin

Reproduction steps

Use useEditorSelection() in conjunction with YjsPlugin.

From the readme:

  1. yarn install
  2. yarn start
  3. Visit http://localhost:5173
  4. Write something in the little editor
  5. Open console
  6. Change selection
  7. Observe that useEditorSelection() returns null / doesn't even execute

Plate version

v44+

Slate React version

0.114.2 (transitive dependency)

Screenshots

bash

Logs

bash

Browsers

Chrome, Firefox