在gemfile中加入(后面版本别丢)

gem 'rails_kindeditor', '~> 0.5.0'

   $ bundle  

创建配置文件,并且引入js

rails g rails_kindeditor:install
rails kindeditor:assets

  js获取编辑器的内容

 rails页面中加入以下表单

  <%= form_for @article do |f| %>
    <%= f.kindeditor :content, :editor_id => 'my_editor' %>
  <% end %>

    js

  my_editor.html();

  

  

 

内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!