-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<textarea> and <pre> content is not converted properly #22
Comments
It looks like this is actually due to the HTMLtoJSX converter. I don't think it produces the JSX necessary to maintain textarea and pre tag contents, here's a fiddle demonstrating this. |
Moved this to react-magic#33 as that's where the HTMLtoJSX converter lives. |
fixed in reactjs/react-magic@8b90aa3 |
Perfect, thanks for the note. I will update turbo-react with the latest react-magic. |
Thanks! Don't forget the rails gem! |
* Fixes #22: `<textarea>` and `<pre>` content not being converted properly
Pushed an updated version of the JS and of the Ruby gem with the update assets. |
Hi. A bit of explanation could be nice. How can I render textarea with new lines? Value attribute still replaces line breaks with spaces. Default value attribute seems not working. |
@tom-orrow this was fixed in reactjs/react-magic@8b90aa3, but |
Actually I just realized I hadn't switched back to the original turbo_react-rails gem. @ssorallen your release doesn't appear to include the newline fixes, any idea? |
@sickslives turbo-react does not bundle Turbolinks any more, so turbo-react needs to the react-magic fix in order to work with Edge Turbolinks. Is there a release of react-magic with the fix? I can update both turbo-react and turbo-react_rails with it. |
@ssorallen The current master branch of react-magic includes the textarea/pre fix, I'm not sure why it didn't come through in your bundle. I got it working in my fork but since the file's minified I can't really tell why mine works and yours doesn't. Covering all the bases, did you remember to copy the dist version over to turbo_react-rails's vendor folder after building turbo-react? :P |
The commit to fix |
The following rules are affecting
<textarea>
and<pre>
when the page renders:Summarized from this pull request. I was originally looking for a way to opt-out a specific element from this, but after reading how react normally works with JSX components I'm not sure how to address this if you're building your UI with something else.
The text was updated successfully, but these errors were encountered: