I have never had this problem in any previous projects, but for some reason all text_area inputs that contain a new line result in a huge indent
ex
I have never had this problem in any previous projects, but for some reason all text_area inputs that contain a new line result in a huge indent
ex
Iso,
If you're generating the text_area contents from rails you may want to try suppressing the new line when closing your ERb phrases like this:
<%= Time.now -%>
instead of
<%= Time.now %>
Just an idea.
Arshak
iso .. wrote:
If you aren't using haml, ignore this.
If you are using haml, this can happen due to how haml formats its ouput.
To fix this in haml, tweak to your haml statement in the view to use the tilde instead of an equals when defining text areas, like the proj_text field below:
%hr/ - form_for @project do |f| %table %tr %td= Project: %td= f.text_field :proj_name, :size => 30 %tr %td Description: %td= f.text_field :proj_desc, :size => 120 %tr %td Notes: %td~ f.text_area :proj_text, :cols => 90, :rows => 20 %hr/ %table %tr %td= f.submit "Save"
Ar Chron wrote:
If you aren't using haml, ignore this.
If you are using haml, this can happen due to how haml formats its ouput.
To fix this in haml, tweak to your haml statement in the view to use the tilde instead of an equals when defining text areas, like the proj_text field below:
%hr/ - form_for @project do |f| %table %tr %td= Project: %td= f.text_field :proj_name, :size => 30 %tr %td Description: %td= f.text_field :proj_desc, :size => 120 %tr %td Notes: %td~ f.text_area :proj_text, :cols => 90, :rows => 20 %hr/ %table %tr %td= f.submit "Save"
I should have mentioned that I am using Haml this time around. That fixed the problem.
Thank you very much.