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.

The convertFromHTML() method currently strips inline style attribute from HTML string. #623

@ademars94

Description

@ademars94

Do you want to request a feature or report a bug?
Report a bug.

What is the current behavior?
The convertFromHTML() method strips inline style attribute from HTML strings.

When importing this HTML string (via convertFromHTML()):
"<p>This is some <span style="color: #f0ad4e">colorful</span> text.</p>"

The line is converted to this:
"<p>This is some colorful text.</p>"

What is the expected behavior?
Keep inline style attribute when using convertFromHTML()

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Draft JS v0.8.1 running in Chrome

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