Skip to content

Mark decorations are split every 512 characters, even within the same line #1616

@iansan5653

Description

@iansan5653

Describe the issue

When rendering a MarkDecoration, the editor view always splits the decoration into several elements if the decorated range spans more than 512 characters, even if all those characters are on the same line.

For example, in this sandbox I expect to have just one decoration around the entire (very long) line. But my element is split into several elements, as you can see by the presence of the red border line inside the text of the line.

Browser and platform

Chrome 140 on MacOS Sequoia 15.6.1

Reproduction link

https://codesandbox.io/p/devbox/beautiful-sound-forked-lc8prr?workspaceId=ws_DetuLAcjQzqJD8grNFUmK7

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