# wysihtml5 for rails A wysiwyg text editor for use in the Rails 3 asset pipeline. ## Installation Add to your Gemfile: ```ruby gem 'wysihtml5-rails' ``` and run: ```sh bundle install ``` ## Usage Require it in your JS manifest's file: ```js //= require wysihtml5 ``` Additionally include `advanced` or `simple` [parser rule](https://github.com/NARKOZ/wysihtml5-rails/tree/master/vendor/assets/javascripts/parser_rules): ```js //= require parser_rules/simple ``` Add to your template before closing `body` html tag: ```html ``` ## Usage example Add to `application.js` ```js //= require wysihtml5 //= require parser_rules/advanced ``` Create form with wysihtml5 textarea: ```erb
<%= form_for @post do |f| %><%= f.text_area :content, :id => 'wysihtml5-textarea' %>
<%= f.submit %>
<% end %> ``` For more information, check out [wysihtml5 wiki](https://github.com/xing/wysihtml5/wiki). ## License wysihtml5 is distributed under the MIT License. wysihtml5-rails is licensed under new BSD License.