Add tinymce

This commit is contained in:
Christophe Vilayphiou 2012-02-15 10:02:05 +08:00
parent a0f58b543b
commit 1913f0aca8
4 changed files with 13 additions and 1 deletions

View File

@ -20,6 +20,7 @@ gem 'rubyzip'
gem 'sinatra' gem 'sinatra'
gem 'sprockets' gem 'sprockets'
gem 'therubyracer' # For linux gem 'therubyracer' # For linux
gem 'tinymce-rails'
# Gems used only for assets and not required # Gems used only for assets and not required
# in production environments by default. # in production environments by default.

View File

@ -179,6 +179,8 @@ GEM
libv8 (~> 3.3.10) libv8 (~> 3.3.10)
thor (0.14.6) thor (0.14.6)
tilt (1.3.3) tilt (1.3.3)
tinymce-rails (3.4.8)
railties (>= 3.1)
treetop (1.4.10) treetop (1.4.10)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
@ -231,5 +233,6 @@ DEPENDENCIES
spork spork
sprockets sprockets
therubyracer therubyracer
tinymce-rails
uglifier uglifier
watchr watchr

View File

@ -9,3 +9,4 @@
//= require bootstrap //= require bootstrap
//= require jquery.tinyscrollbar.min //= require jquery.tinyscrollbar.min
//= require orbit-1.0 //= require orbit-1.0
//= require tinymce-jquery

View File

@ -137,5 +137,12 @@
$('#bulletin_files').append(("<%= escape_javascript(add_attribute 'bulletin_file', f, :bulletin_files) %>").replace(old_id, new_id)); $('#bulletin_files').append(("<%= escape_javascript(add_attribute 'bulletin_file', f, :bulletin_files) %>").replace(old_id, new_id));
}); });
</script> </script>
<script type="text/javascript">
$(function() {
$('textarea').tinymce({
theme: 'advanced'
});
});
</script>
<% end %> <% end %>