Rails integration for ueditor richedit (from baidu)
-
add 'ueditor-rails' gems to Gemfile, and bundle install
-
merge uedtior-rails migrations to your app
bundle exec rake ueditor:install:migrations
-
apply migrations
bundle exec rake db:mgirate
-
add ueditor routes in your config/routes.rb
mount Ueditor::Engine => '/ueditor'
-
add ueditor.js into your app application.js file or other asset piple manifest file. as following
//=require ueditor
-
use it!
<script type="text/javascript"> UE.getEditor('your-texta-id', { some-option-key: somevalue}) </script>
-
that's all.
MIT License