Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

convertFromHTML merged <p> tags into one <p> tag #523

@js8310

Description

@js8310

I'm having some problems with the convertFromHTML, it doesn't render the right data as I expected.

For example,
html: <p>Paragraph 1</p>, <p>Paragraph 2</p>, <p>Paragraph 3</p>

editorState:
EditorState.createWithContent(ContentState.createFromBlockArray(convertFromHTML(_html_)), Decorator)

The html at this stage render correctly as expected.

Paragraph 1
Paragraph 2
Paragraph 3

However, when I save data and refresh the page, it displays as below (all in one line)

Paragraph 1 Paragraph 2 Paragraph 3

Then, I clicked on the editor and suddenly the html turned into
<p>Paragraph 1 Paragraph 2 Paragraph 3</p>

Does anyone has similar problem like this? Thanks.

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