Skip to content

[Super Editor] - Code block newline insertion position is wrong #2505

Open
@matthew-carroll

Description

Repro:

  • Create a code block with at least a few characters of content
  • Place the caret in the middle of the text
  • Insert a newline

Actual result:
The newline is inserted at the end of the code block

Expected result:
The newline should split the code block into two blocks at the caret position.

The root problem is in the code block newline insertion command where we should be using the caret node position, but instead we're using the end of the code block.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions