• kindeditor的使用


    之前我在15-1688的新闻系统中也无意间使用了kindeditor,

    今天在rails上也用上了这个编辑器

    小记于此

    感谢https://github.com/mlzboy/kindeditor

    在安装的时候有一些问题使用bundle install,指定git装不上去反尔是

    gem 'kindeditor'

    gem 'paperclip', :git => 'http://github.com/thoughtbot/paperclip.git'

    这样就装上去了

    之后要运行

    rails g kindeditor:install

    rails db:migrate

    这样就基本ok了,

    再参照,readme所说的

    • kindeditor helper to layout that you want to use it

      <%=kindeditor_javacript_include_tag%>

    • add a id "kindeditor" to your textarea

          <%= f.text_area :memo,:id => "kindeditor" %>

      <%= f.text_area :memo,:id => "kindeditor" ,:style=>"530px;height:300px;visibility:hidden;"%>



      之前我还试了同一作者改的tiny-mce由于依赖太多了,其中有一个是responed-to-parent gem,在svn库我不知道如何安装,就放弃了,


      另外好像在rails3下作为编辑器的选择还是很多的,还且个ckeditor它使用的是attachment_fu,我未曾尝试工,罗列于此,

      主要是kindeditor之前我也用过,然后paperclip在我应用中也用了,看来是个挺完美的结合,呵呵


      另外在github上下东西好慢,可能又是网络的问题了,很闹心

  • 相关阅读:
    浏览器返回按钮不会触发onLoad事件
    js常用方法
    清除浮动
    Hbuilder快捷键
    页面跳转
    castapp.js颜色配置
    mui学习
    css 特殊使用技巧
    mui框架如何实现页面间传值
    从0到千万级访问量网站架构演变史
  • 原文地址:https://www.cnblogs.com/lexus/p/1885281.html
Copyright © 2020-2023  润新知