Skip to content

Selecting blocks without content #1516

Open

Description

@zeyu2001

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

The user may want to select a range of blocks, even if they do not contain content (e.g. image blocks).

For instance, the user may wish to delete all of those blocks at the same time. However, this is only possible if the start and end of the selection are blocks with content. In some edge cases, e.g. when using "Ctrl-A" on a document where the first block does not contain content (e.g. an image block), no selection is made, so e.g. "Ctrl-A" + "Ctrl-C", "Ctrl-A" + "Backspace" etc. do not work.

I tried to handle this manually but editor.setSelection requires that both start and end blocks are content blocks.

Describe the solution you'd like

Ideally, it would be nice if editor.setSelection supports all block types. But I'm not sure how well this would work with TipTap so some custom logic to track the selected nodes may be necessary.

I'm happy to look into this more if someone could point me in the right direction :)

Activity

  1. juliomuhlbauer commented on Mar 16, 2025

    @juliomuhlbauer

    Same problem here.
    It would be nice if BlockNote replicates the select behavior from Notion.

    Image

  2. urjitc commented on Nov 13, 2025

    @urjitc

    Would love this

  3. nperez0111 commented on Nov 19, 2025

    @nperez0111
    Contributor

    We are working on this as part of our "location API", which is being worked on here: #2044

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

    bug:P3Medium: Noticeable but non-blocking issues.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions