WysiwygRailsSimpleForm

wysiwyg_rails_simple_form gem adds simple_form input for editor wysiwyg-rails.

Note: This gem doesn't include wysiwyg-rails and simple_form.

Installation

Add this line to your application's Gemfile

gem 'wysiwyg_rails_simple_form'

and run bundle install.

After it you need to run the generator:

rails generate wysiwyg_rails_simple_form:install

The generator will add the /config/initializers/wysiwyg_rails_simple_form.rb initializer to your application.

Using wysiwyg_rails_simple_form.

Now you can simply create full featured wysiwyg from any input. Just add as: :wrsf like following:

<%= f.input :content, as: :wrsf %>

You can customize editor through a hash wrsf_options or edit initializer file /config/initializers/wysiwyg_rails_simple_form.rb.

<%= f.input :content, as: :wrsf, wrsf_options: {minHeight: 150, maxHeight: 300} %>

Contributing

  1. Fork it ( https://github.com/nexoff/wysiwyg_rails_simple_form/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request