-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Add 'text' to auto-format query method #1053
Conversation
As auto-format rules run before text is inserted into the editor, when you use the query option to control validity you cannot access the last thing the user entered. In the case of code-blocks which should be '```` the query method can only derive '``' from the editor (currentNode). This PR ensure the last thing typed is also passed into the query method.
🦋 Changeset detectedLatest commit: a8d7b40 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/udecode/plate/9gYiFQJ7zEMFSvPxacd6uWZScx2V |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, just left one request then we can merge this
As auto-format rules run before text is inserted into the editor, when you use the query option to control validity you cannot access the last thing the user entered. In the case of code-blocks which should be '```' the query method can only derive '``' from the editor.
This PR ensure the last thing typed is also passed into the query method.
Checklist
yarn test
.yarn lint
. (Fix errors withyarn lint --fix
.)yarn docs
.)