Skip to content

Text collapses to one character per line near an online-inserted image with a caption #3837

Description

@bebopnep

What happened?

Importing a .docx containing an online-inserted image with a caption causes layout breaks in the SuperDoc editor, specifically forcing subsequent indented text to render vertically (one character per line).

The indented sentence immediately following the image renders as one character per line vertically.

and when i tired to experiment further by opening the .docx in word and adding a few line breaks ( 3 line breaks) before the indented sentence, and saved it and opened it in superdoc.

It renders the text horizontally as expected. However, superdoc incorrectly strips/removes those line breaks from the layout entirely.

but it exports both versions normally, so it is a rendering issue only.

Steps to reproduce

  1. Create a Word document containing a numbered list.
  2. Insert an "Online Picture" next to the list (Word produces an image + caption).
  3. Immediately below the image and the list, insert a text sentence (ex: "What do I need to do now?") and increase its right indent several times (move it closer to the right margin and far from the left margin).
  4. Import the .docx into SuperDoc.
  5. Observe that the sentence renders vertically.
  6. To reproduce the line break issue: Open the same .docx in Word, add 3 line breaks before the indented sentence, save, and import into SuperDoc again. Observe that the line breaks are stripped.

Testrun - Copy.docx

SuperDoc version

1.45.0

Browser

Chrome

Additional context

Image The .docx in word Image The .docx in an html of superdoc in chrome Image Same .docx with 3 line breaks added Image the second version of the .docx in superdoc

Metadata

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