-
-
Notifications
You must be signed in to change notification settings - Fork 755
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
Delete forward on empty line before code block unwraps code line #2686 #2687
Conversation
🦋 Changeset detectedLatest commit: 33f4129 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I think Notion's behavior is the expected one for many consumers: 2023-10-08.at.09.42.20.mp4It resets the type of the next (nested) block then let the default merge to be applied. So this should not be done in the paragraph plugin. I'd create another plugin with |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Would you be able to rename this plugin To summarise:
|
Hi @12joan, I have one doubt, there is a file customizer-items.ts and referenced plugin is registered here (KEY_SELECT_ON_BACKSPACE) CONTRIBUTING.md seems outdated for plugins, is my plugin needed to be registered in same way in this file? |
This comment was marked as resolved.
This comment was marked as resolved.
apps/www/src/lib/plate/demo/plugins/removeOnDeleteForwardPlugin.ts
Outdated
Show resolved
Hide resolved
As commented in the review, this plugin can be enabled on all blocks by default (condition: |
…ue when query is undefined
templates/plate-playground-template/src/lib/plate/plate-plugins.ts
Outdated
Show resolved
Hide resolved
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.
Thanks for all your hard work. I've awarded the bounty.
@zbeyens Everything looks good on my end. If you're satisfied with the fixes, I think we're ready to merge?
/claim #2686
Idea of implemention was to delete the current line if its empty and move the cursor to next line without impacting the next block (be it code block or listing or anything)
I have also handled a case when empty line is the first line of the page, in this case, delete the current line and move the cursor to next line.
Behavior after fix:
2023-10-08_07-45-44.mp4