Skip to content

Improve delete key behavior near image blocks #1478

Description

@jorgefreires

Is your feature request related to a problem? Please describe.

I experience unexpected behavior when working with images in BlockNote. When editing a paragraph adjacent to an image block and pressing the Delete key at the start of the subsequent line, the image gets deleted rather than the cursor moving into the image block.

Examples of current behavior vs expected behavior:

Expected (Google Docs behavior):
https://github.com/user-attachments/assets/1e1f97f8-2438-4d63-8b23-36a991ea8711
Cursor moves into image block when deleting at line start

Current (BlockNote behavior):
https://github.com/user-attachments/assets/f0b24e02-7ff8-479e-a75d-e05328059d20
Image gets deleted when using Delete key at line start

Describe the solution you'd like
The cursor should move into the image block when pressing Delete at the beginning of the subsequent line, rather than deleting the image. This should mirror the behavior seen in Google Docs and other mainstream text editors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions