Cannot read property length of undefined when pasting

When I paste content that has no line breaks, I get an “undefined” error when the editor tries to read the section’s length property


Attachment: image_20650750.png

1 Reply

SS Sujitha Siva Syncfusion Team November 28, 2025 10:54 AM UTC

Hi Davi,

We attempted to replicate the issue by copying content without any line breaks and pasting it into the Document Editor. However, the content pasted correctly, and no script error occurred. We have attached a video demonstrating two scenarios:

  1. Pasting a long paragraph without any line breaks.
  2. Pasting a paragraph with line breaks.
    In both cases, the editor functioned as expected.

 

Kindly review the video and confirm if you are following the same steps. To help us investigate further, please provide the following details:

  1. Exact steps to reproduce the issue.
  2. The input document you are copying and pasting from.
  3. A screenshot of the script error you are referring to.
  4. We have attached a StackBlitz sample below please try to replicate the issue using this sample and share the results with us.

Sample: Tlzqm92a (duplicated) - StackBlitz


Note: We are using the latest version(31.2.15) of the Document Editor. Kindly specify the version in which you are encountering the issue.

 

This information will help us analyze the issue further and provide a more effective solution.


Regards.

Sujitha S


Attachment: Copy_Paste_Without_Linebreaks_6ded9733.zip

Loader.
Up arrow icon