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:
yarn installyarn start- Visit http://localhost:5173
- Write something in the little editor
- Open console
- Change selection
- Observe that
useEditorSelection()returns null / doesn't even execute
Plate version
v44+
Slate React version
0.114.2 (transitive dependency)
Screenshots
Logs
Browsers
Chrome, Firefox
Source: udecode/plate