Skip to content

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

@eriksson-daniel

Description

@eriksson-daniel

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

Logs

Browsers

Chrome, Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions