diff --git a/Gemfile b/Gemfile index 69f4027..7d5e47a 100644 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,8 @@ gem 'bb-ruby' gem 'kaminari-bootstrap' +gem "ckeditor" + group :production do gem 'unicorn' end diff --git a/Gemfile.lock b/Gemfile.lock index 77a1a0e..9e323db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,6 +39,9 @@ GEM bcrypt-ruby (3.0.1) builder (3.0.4) cancan (1.6.8) + ckeditor (4.0.0) + mime-types + orm_adapter coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) @@ -112,7 +115,7 @@ GEM rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.7) - thor (0.16.0) + thor (0.17.0) tilt (1.3.3) treetop (1.4.12) polyglot @@ -134,6 +137,7 @@ PLATFORMS DEPENDENCIES bb-ruby cancan + ckeditor coffee-rails (~> 3.2.1) devise execjs diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e7bf068..7e99f66 100755 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,4 +1,5 @@ // Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults //= require_self +//= require ckeditor/init //= require_tree . diff --git a/app/views/posts/_form.html.erb b/app/views/posts/_form.html.erb index 482c155..ee7cecd 100755 --- a/app/views/posts/_form.html.erb +++ b/app/views/posts/_form.html.erb @@ -9,7 +9,7 @@ <% flash.now[:error] = @post.errors.full_messages.join(', and ') %> <% end %> <%= f.label :body %> - <%= f.text_area :body, :style => "width:98%", :rows => 15 %> + <%= f.cktext_area :body, :style => "width:98%", :rows => 15 %>
<% end %>