wangeditor_rails
wangEditor —— 轻量级 web 富文本编辑器,配置方便,使用简单。支持 IE10+ 浏览器。
Features
Install
- Add to Gemfile then run 'bundle'
gem 'wangeditor_rails'
- Run install generator
rails generate wangeditor:install
- Add below line to your application.js
//= require wangEditor
Usage:
<%= form_for @post do |f| %>
<%= f.text_field :body %>
<%= f.wangeditor :body %>
<%= f.submit %>
<% end %>
with SimpleForm
<%= simple_form_for @post do |f| %>
<%= f.input :title %>
<%= f.input :body, as: :wangeditor %>
<%= f.button :submit %>
<% end %>
Todo
Thanks
License
MIT License.