Skip to content

HTMLtoJSX converter does not convert <textarea> and <pre> content correctly #33

Closed

Description

@sicks

Here's a fiddle

When HTML containing textarea's or pre's with newlines are fed into the HTML to JSX converter, the newlines in the textarea or pre are not converted the way they need to be for multiline content to remain intact. See why textarea value

JSX whitespace coalescing rules end up being applied when the result is rendered.

Activity

  1. Daniel15 commented on Sep 6, 2015

    @Daniel15
    Contributor

    Fantastic bug report, thank you! I'll take a look.

  2. self-assigned this
    on Sep 6, 2015
  3. Daniel15 commented on Sep 6, 2015

    @Daniel15
    Contributor

    Done in 9056a27, let me know if I missed any edge cases :)

  4. sicks commented on Sep 8, 2015

    @sicks
    ContributorAuthor

    Thanks! One thing: textarea should use defaultValue instead of value, otherwise you can't edit the contents after they've been rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ Proxy