Delete forward on empty line before code block unwraps code line #2686#2687
Delete forward on empty line before code block unwraps code line #2686#2687zbeyens merged 18 commits intoudecode:mainfrom
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

/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