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

fix(core): Can() does not work for setting marks #3223

Merged
merged 1 commit into from
Sep 26, 2022
Merged

Conversation

C-Hess
Copy link
Contributor

@C-Hess C-Hess commented Sep 22, 2022

Previously, setting marks did no schema validation checks for dry runs (like the .can() command). The setMark raw command will now properly check if the mark is possible to be set given the editor node/mark schema.

The logic was added is similar to the private markApplies method used internally by ProseMirror's toggleMark command but with additional functionality to support stored cursor marks and mark exclusions.

fix #3057

Previously, setting marks did no schema validation checks for dry runs
(like the `.can()` command). The `setMark` raw command will now properly
check if the mark is possible to be set given the editor node/mark
schema.
@netlify
Copy link

netlify bot commented Sep 22, 2022

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 67626ea
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/632bafc33133d40009645ca1
😎 Deploy Preview https://deploy-preview-3223--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@bdbch bdbch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great pull request. Thanks @C-Hess

I didn't really see an issue with your implementation.

@bdbch bdbch merged commit 17a41da into ueberdosis:main Sep 26, 2022
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.

can() command working Unexpectedly
3 participants