How to allow paragraphs in a rails text area similar to html text editors such as ckeditor? -



How to allow paragraphs in a rails text area similar to html text editors such as ckeditor? -

is there way to allow user write paragraphs (with spaces) in rails text_area similar html text editors such ckeditor.

<%= form_for(@usernote) |f| %> <%= render 'shared/error', object: f.object %> <div class="field"> <%= f.text_area :note, :rows => 15, placeholder: "create note..." %> </div> <%= f.submit "create", class: "btn btn-large btn-success" %> <% end %>

by "spaces" mean new lines?

when display text database view, can utilize simple_format() view helper re-apply formatting user submitted text with.

#show.html.erb <p><%= @post.title %></p> <p><%= simple_format(@post.body) %></p>

ruby-on-rails ckeditor

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -