天天红玉世界

Rails Ruby Erlang 。。。创新来自于刻苦的实践和勤奋的思考... www.hhtong.com

www.lycom.de

Rails实例世界(No 3):关于Textile的可视化编辑插件textile_toolbar

Gudao Luo2008-11-27 at 11:23发表的

关于Textile的可视化编辑插件textile_toolbar

注:好像Firefox不能够访问上面图的链接,而使用浏览器Safari是可以的。
 
使用关于Textile的可视化插件textile_toolbar方法
rails textile_toolbar_demo && cd textile_toolbar_demo
 
ruby script/plugin install git://github.com/pelargir/textile_toolbar.git
rake textile_toolbar:install
 
ruby script/generate scaffold post title:string body:text published:boolean
 
vi app/views/posts/edit.html.erb
<%#= f.text_area :body %>
<%= f.textile_area :body, :rows => 5, :cols => 20 %>
 
vi app/views/layouts/posts.html.erb
<%= stylesheet_link_tag 'scaffold' %>
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag "textile_toolbar.js" %>
 
rake db:migrate && rake db:fixtures:load
 
ruby script/server
 
# http://localhost:3000/posts/<post.id>/edit

Comments

There are 0 comments on this post. Post yours →

Post a comment

Required fields in bold.