Skip to content

Cannot add new line in custom block's content #1551

Closed
@ClementEXWiki

Description

@ClementEXWiki

Describe the bug
If you make a custom block and you press the Enter key, it will not make a newline but instead jump out of the block.

This is a very big limitation as it makes traditional blocks basically useless. Only inline content is supported.

I saw in another issue that using a keyDown event listener was recommended - which has a lot of problems (doesn't support clipboard pasting, doesn't work reliably in every context, doesn't always work on mobile browsers, doesn't support some accessibility options, etc.)

How hard would it be to implement support for newlines in custom blocks?

Thanks!

To Reproduce
https://stackblitz.com/edit/github-df1nzmdk

Type /wrapper to insert the custom block in the editor, then try to add some newlines in it.

Misc

  • Node version: v22.14.0
  • Package manager: 10.6.0
  • Browser: Firefox 136

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions