-
Notifications
You must be signed in to change notification settings - Fork 573
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
line breaks in textareas #62
Comments
Hi, thanks for your comments. I think it's usually best to let the developer handle how to display things and not give anything done by default. As you say, it can be done using the 'dispolay_as' feature, even though I may agree with you that this can be a little hard to do for a new rails developer. Maybe a better docs or a wiki page talking about this could help. About adding an option to do it, I rather think that it might be more useful to add a new feature to make 'display_as' work with a helper method directly. People usually use this feature as a bridge to some other rails helper method, like About your note about the text beeing displayed without format during the ajax request you're right, we'll look into it and thanks for the catch! |
Hi, I've just implemented a new feature
|
When I do this: |
Same error here. |
and me too! |
Added as a new issue : #78 |
Hi all, This issue is now solved with pull request #79. You can checkout Rails Action View's SanitizeHelper, which includes After some investigation, I realized that SanitizeHelper's The answer is no. The problem is that we used Action View's Helpers in the non-right way, without loading every single Helper as we should do. In our previous approach, the ClassMethods weren't correctly load, so our dear Now we are using an instance of ActionView::Base, so everything is loaded in a more right way, and everything keeps being as simple as always. |
I still get this issue when doing, for example, |
Hello @cbanke1 Which best_in_place are you using? This fix is not yet in any version of the gem, so if you want to use it you have to use the gem directly from the git repository. We are planning to do a release (which will be 1.0.5) in less than two weeks. Did it fix the issue? |
@albertbellonch Should I also specify a commit? It seems like pulling from github should pull the most recent master. UPDATE: I think I fixed the issue, which was local. I'll come back if I have more information. Thanks for all your help! |
Me 2 |
same here |
I am using display_with: :simple_format. Its working fine. But then, the text does not remain editable at all. |
@Akshg I am running into the sample issue. |
@cg5544 Even i was am facing the same issue at that time. Any progress? |
This is a feature request.
When using a textarea, the developer often intends for the field to contain line breaks. Best_in_place doesn't display newlines in textareas as html
<br>
tags. It would be really convenient if it did by default, or had an option to.I was able to implement a workaround with a display_as, but there are two problems with it:
Let me know if this is already possible and I just missed it.
The text was updated successfully, but these errors were encountered: