Intégration de tiny mce 4 pour l'édition visuelle
This commit is contained in:
parent
4cec615f14
commit
75f165804b
4
Gemfile
4
Gemfile
@ -72,6 +72,10 @@ gem 'actionview-encoded_mail_to'
|
||||
# Carte openstreetmap
|
||||
gem 'openlayers-rails'
|
||||
|
||||
# Tiny MCE integration
|
||||
gem 'tinymce-rails'
|
||||
gem 'tinymce-rails-langs'
|
||||
|
||||
group :development do
|
||||
gem 'guard-livereload'
|
||||
gem 'guard-bundler'
|
||||
|
23
Gemfile.lock
23
Gemfile.lock
@ -1,6 +1,6 @@
|
||||
GIT
|
||||
remote: git://github.com/gregbell/active_admin.git
|
||||
revision: 2ae0a9e09bf9fab7fd95e245b6c46d5c7fc2a953
|
||||
revision: 063e00b533d4d6c83052b04e7f9cfd86fb68f8fe
|
||||
specs:
|
||||
activeadmin (1.0.0.pre)
|
||||
arbre (~> 1.0)
|
||||
@ -9,7 +9,7 @@ GIT
|
||||
formtastic (~> 2.3.0.rc3)
|
||||
inherited_resources (~> 1.4.1)
|
||||
jquery-rails
|
||||
jquery-ui-rails
|
||||
jquery-ui-rails (~> 5.0)
|
||||
kaminari (~> 0.15)
|
||||
rails (>= 3.2, < 4.2)
|
||||
ransack (~> 1.0)
|
||||
@ -79,17 +79,16 @@ GEM
|
||||
coffee-rails (4.0.1)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script (2.3.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.7.0)
|
||||
coffee-script-source (1.7.1)
|
||||
compass (0.12.6)
|
||||
chunky_png (~> 1.2)
|
||||
fssm (>= 0.2.7)
|
||||
sass (~> 3.2.19)
|
||||
compass-rails (1.1.7)
|
||||
compass-rails (2.0.0)
|
||||
compass (>= 0.12.2)
|
||||
sprockets (<= 2.11.0)
|
||||
devise (3.2.4)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
@ -146,11 +145,11 @@ GEM
|
||||
highline (1.6.21)
|
||||
hike (1.2.3)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.6.9)
|
||||
i18n (0.6.11)
|
||||
inherited_resources (1.4.1)
|
||||
has_scope (~> 0.6.0.rc)
|
||||
responders (~> 1.0.0.rc)
|
||||
jbuilder (2.1.1)
|
||||
jbuilder (2.1.2)
|
||||
activesupport (>= 3.0.0, < 5)
|
||||
multi_json (~> 1.2)
|
||||
jquery-rails (3.1.1)
|
||||
@ -176,7 +175,7 @@ GEM
|
||||
treetop (~> 1.4.8)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
minitest (5.3.5)
|
||||
minitest (5.4.0)
|
||||
modernizr-rails (2.7.1)
|
||||
multi_json (1.10.1)
|
||||
mysql2 (0.3.16)
|
||||
@ -269,6 +268,10 @@ GEM
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
timers (1.1.0)
|
||||
tinymce-rails (4.1.0)
|
||||
railties (>= 3.1.1)
|
||||
tinymce-rails-langs (4.20140129)
|
||||
tinymce-rails (~> 4.0)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
@ -318,6 +321,8 @@ DEPENDENCIES
|
||||
simple_calendar
|
||||
spring
|
||||
therubyracer
|
||||
tinymce-rails
|
||||
tinymce-rails-langs
|
||||
turbolinks
|
||||
uglifier
|
||||
webrick (>= 1.3.1)
|
||||
|
@ -12,6 +12,7 @@
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require tinymce-jquery
|
||||
//= require jquery.turbolinks
|
||||
//= require turbolinks
|
||||
//= require modernizr
|
||||
|
@ -174,5 +174,8 @@ sidebar#lug-list
|
||||
margin-left: 6.75em
|
||||
margin-bottom: 10px
|
||||
|
||||
.mce-tinymce *
|
||||
@include transition-duration(0)
|
||||
|
||||
.description
|
||||
text-align: left
|
||||
|
@ -21,7 +21,7 @@
|
||||
:markdown
|
||||
#{t '.title_helper'}
|
||||
= f.label :title
|
||||
= f.text_field :title, required: true, size: 70
|
||||
= f.text_field :title, required: true ,size: 70
|
||||
.field
|
||||
= f.label Event.human_attribute_name :start_time
|
||||
= f.datetime_select :start_time, required: true
|
||||
@ -33,7 +33,8 @@
|
||||
:markdown
|
||||
#{t '.description_helper'}
|
||||
= f.label Event.human_attribute_name :description
|
||||
= f.text_area :description, required: true, rows: 29, cols: 80
|
||||
= f.text_area :description, required: true, class: 'tinymce', rows: 29, cols: 80
|
||||
= tinymce language: 'fr_FR'
|
||||
|
||||
.field
|
||||
= f.label Event.human_attribute_name :city
|
||||
|
21
config/tinymce.yml
Normal file
21
config/tinymce.yml
Normal file
@ -0,0 +1,21 @@
|
||||
toolbar:
|
||||
- undo redo | bold italic strikethrough | bullist numlist outdent indent | alignleft aligncenter alignright alignjustify | link media insertdatetime charmap table | searchreplace | code visualblocks preview fullscreen
|
||||
plugins:
|
||||
- lists
|
||||
- advlist
|
||||
- autolink
|
||||
- link
|
||||
- charmap
|
||||
- paste
|
||||
- print
|
||||
- preview
|
||||
- table
|
||||
- fullscreen
|
||||
- searchreplace
|
||||
- media
|
||||
- insertdatetime
|
||||
- visualblocks
|
||||
- visualchars
|
||||
- wordcount
|
||||
- contextmenu
|
||||
- code
|
Loading…
Reference in New Issue
Block a user