Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Enable selection when editor in readonly=true #4620

Merged

Conversation

NicklasAndersson
Copy link
Contributor

Fork of #4375 with an attempt to resolve the spelling in the comments.

There is needs to access the selection in read-only mode in some cases. For example, when implementing a comment feature, you need to know the location of the selection in Slate in order to do the corresponding highlighting, referencing and location recording. But the current design, in read-only mode, editor.selection is always null.

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2021

🦋 Changeset detected

Latest commit: 340b594

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slate-react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dylans
Copy link
Collaborator

dylans commented Oct 22, 2021

@NicklasAndersson could you please add a changeset. Then i think this one is good to land.

@dylans dylans merged commit 0b59ad5 into ianstormtaylor:main Oct 24, 2021
This was referenced Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants