gem install rails_kindeditor
After you install rails_kindeditor and add it to your Gemfile, you need to run the generator:
rails generate rails_kindeditor:install
The generator will copy kindeditor to your application. When you are done, you are ready to add migration using the generator:
rails generate rails_kindeditor:migration
The generator will copy migration to your application. When you are done, remember run rake db:migrate:
rake db:migrate
Don’t forget add this to your Gemfile
gem "carrierwave", "~> 0.5.4" gem "rails_kindeditor"
add this to your Gemfile
gem "mongoid", "~> 2.0" gem "bson_ext", "~> 1.2"
migration using the generator:
rails generate rails_kindeditor:migration -o mongoid
Basically include <%= include_kindeditor_if_needed %> under the <head> element of your in your layout file:
<%= include_kindeditor_if_needed %>
In your controller, use include_kindeditor method to load kindeditor javascript:
include_kindeditor
You can load kindeditor javascript only in some action if you needed:
include_kindeditor :only => [:new, :edit] include_kindeditor :except => [:index, :show, :destroy, :create]
Assign your textarea with id
:id => "kindeditor_id"
You can config kindeditor by rails_kindeditor-init.js file:
public/javascripts/kindeditor/kindeditor-init.js
MIT License. Copyright 2011