ckeditor 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/README.md +36 -26
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +6 -2
- data/app/controllers/ckeditor/application_controller.rb +11 -10
- data/app/controllers/ckeditor/attachment_files_controller.rb +8 -2
- data/app/controllers/ckeditor/pictures_controller.rb +8 -2
- data/config/locales/ja.ckeditor.yml +9 -0
- data/lib/ckeditor.rb +8 -0
- data/lib/ckeditor/backend/dragonfly.rb +8 -6
- data/lib/ckeditor/hooks/cancan.rb +4 -1
- data/lib/ckeditor/utils.rb +2 -2
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +13 -19
- data/lib/tasks/ckeditor.rake +21 -8
- data/test/ckeditor_test.rb +6 -0
- data/test/dummy/log/test.log +619 -0
- data/test/dummy/public/ckeditor_assets/attachments/1/rails_tar.gz +0 -0
- data/test/dummy/public/ckeditor_assets/pictures/1/content_rails.png +0 -0
- data/test/dummy/public/ckeditor_assets/pictures/1/original_rails.png +0 -0
- data/test/dummy/public/ckeditor_assets/pictures/1/thumb_rails.png +0 -0
- data/test/dummy/public/uploads/ckeditor/attachments/1/rails.tar.gz +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/1/content_rails.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/1/rails.png +0 -0
- data/test/dummy/public/uploads/ckeditor/pictures/1/thumb_rails.png +0 -0
- data/test/models/picture_test.rb +6 -1
- data/test/tmp/app/models/ckeditor/asset.rb +5 -0
- data/test/tmp/app/models/ckeditor/attachment_file.rb +12 -0
- data/test/tmp/app/models/ckeditor/picture.rb +13 -0
- data/test/tmp/config/initializers/ckeditor.rb +39 -0
- data/test/tmp/config/routes.rb +6 -0
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +16 -1
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +1 -1
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +1 -1
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +480 -478
- data/vendor/assets/javascripts/ckeditor/config.js +10 -0
- data/{app/assets/stylesheets → vendor/assets/javascripts}/ckeditor/contents.css +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bg.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/bs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/da.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-au.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/eu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fa.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fr-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/gl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/gu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hi.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/hr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/hu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/is.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ka.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/km.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/ko.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ku.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/lv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/mk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/mn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ms.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/nb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/no.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/pt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/si.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sq.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/sr-latn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/tt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/ug.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/uk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/zh.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +8 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +21 -21
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/af.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/bg.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cs.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/cy.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/da.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/de.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/el.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/eo.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/es.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/et.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fa.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/fr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/gl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/he.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/hu.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/id.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/it.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ja.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/km.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ku.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lt.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/lv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nb.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/nl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/no.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/pt.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/si.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sl.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sq.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/sv.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/th.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tr.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/tt.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ug.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/uk.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/vi.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +1 -1
- data/{app → vendor}/assets/javascripts/ckeditor/styles.js +3 -2
- metadata +34 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a521b18f6252ed84f4b0f733a3be5c82d14a36d
|
|
4
|
+
data.tar.gz: 08dd944031cf738410b264fc4f26d058a4ffdca0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48415dfdc911779debeb1f03ee1697f5a6a1cb48c2da5803d53c6f8494804b6bacb85ddb238aca5a01c407079ad867a64695d315c17c641268adde88d6983927
|
|
7
|
+
data.tar.gz: 0fd956940b958d39fe96bfb9e7a66fac05669eccc191d387966a35dea2a7706e1619dcde47bfcf0d8fdf4e492202b559271ebe141fdde6941a44525bca4d78c9
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# Ckeditor
|
|
2
2
|
|
|
3
|
-
CKEditor is a
|
|
3
|
+
CKEditor is a WYSIWYG text editor designed to simplify web content creation. It brings common word processing features directly to your web pages. Enhance your website experience with our community maintained editor.
|
|
4
4
|
[ckeditor.com](http://ckeditor.com/)
|
|
5
5
|
|
|
6
6
|
## Features
|
|
7
7
|
|
|
8
|
-
* Ckeditor version 4.4.
|
|
8
|
+
* Ckeditor version 4.4.7 (full 27 Jan 2015)
|
|
9
9
|
* Rails 4 integration
|
|
10
10
|
* Files browser
|
|
11
|
-
* HTML5
|
|
11
|
+
* HTML5 file uploader
|
|
12
12
|
* Hooks for formtastic and simple_form forms generators
|
|
13
13
|
* Integrated with authorization framework CanCan and Pundit
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
17
|
-
For basic usage just include ckeditor gem:
|
|
17
|
+
For basic usage just include the ckeditor gem:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
gem 'ckeditor'
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
or if you
|
|
23
|
+
or if you'd like to use the latest version from Github:
|
|
24
24
|
|
|
25
25
|
```
|
|
26
26
|
gem 'ckeditor', github: 'galetahub/ckeditor'
|
|
@@ -28,23 +28,23 @@ gem 'ckeditor', github: 'galetahub/ckeditor'
|
|
|
28
28
|
|
|
29
29
|
#### Using with ruby 1.8.7
|
|
30
30
|
|
|
31
|
-
For usage with ruby 1.8.7 you need to specify gem version:
|
|
31
|
+
For usage with ruby 1.8.7 you need to specify the gem version:
|
|
32
32
|
|
|
33
33
|
```
|
|
34
34
|
gem 'ckeditor', '4.0.4'
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
For
|
|
38
|
-
|
|
37
|
+
For file upload support, you must generate the necessary file storage models.
|
|
38
|
+
The currently supported backends are:
|
|
39
39
|
|
|
40
40
|
* ActiveRecord (paperclip, carrierwave, dragonfly)
|
|
41
41
|
* Mongoid (paperclip, carrierwave, dragonfly)
|
|
42
42
|
|
|
43
|
-
### How generate models
|
|
43
|
+
### How to generate models to store uploaded files
|
|
44
44
|
|
|
45
45
|
#### ActiveRecord + paperclip
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
To use the active_record orm with paperclip (i.e. the default settings):
|
|
48
48
|
|
|
49
49
|
```
|
|
50
50
|
gem 'paperclip'
|
|
@@ -61,6 +61,16 @@ gem 'mini_magick'
|
|
|
61
61
|
rails generate ckeditor:install --orm=active_record --backend=carrierwave
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
#### ActiveRecord + dragonfly
|
|
65
|
+
|
|
66
|
+
Requires Dragonfly 1.0 or greater.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
gem 'dragonfly'
|
|
70
|
+
|
|
71
|
+
rails generate ckeditor:install --orm=active_record --backend=dragonfly
|
|
72
|
+
```
|
|
73
|
+
|
|
64
74
|
#### Mongoid + paperclip
|
|
65
75
|
|
|
66
76
|
```
|
|
@@ -80,14 +90,14 @@ rails generate ckeditor:install --orm=mongoid --backend=carrierwave
|
|
|
80
90
|
|
|
81
91
|
#### Load generated models
|
|
82
92
|
|
|
83
|
-
All ckeditor models will be generated
|
|
84
|
-
Models are autoloaded in Rails 4. For earlier Rails versions you need to add them to autoload path (in application.rb):
|
|
93
|
+
All ckeditor models will be generated in the app/models/ckeditor directory.
|
|
94
|
+
Models are autoloaded in Rails 4. For earlier Rails versions, you need to add them to the autoload path (in application.rb):
|
|
85
95
|
|
|
86
96
|
```ruby
|
|
87
97
|
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
|
|
88
98
|
```
|
|
89
99
|
|
|
90
|
-
Mount
|
|
100
|
+
Mount the Ckeditor::Engine in your routes (config/routes.rb):
|
|
91
101
|
|
|
92
102
|
```ruby
|
|
93
103
|
mount Ckeditor::Engine => '/ckeditor'
|
|
@@ -117,9 +127,9 @@ Form helpers:
|
|
|
117
127
|
|
|
118
128
|
### Customize ckeditor
|
|
119
129
|
|
|
120
|
-
All ckeditor options [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
|
|
130
|
+
All ckeditor options can be found [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
|
|
121
131
|
|
|
122
|
-
In order to configure the ckeditor default options, create files:
|
|
132
|
+
In order to configure the ckeditor default options, create the following files:
|
|
123
133
|
|
|
124
134
|
```
|
|
125
135
|
app/assets/javascripts/ckeditor/config.js
|
|
@@ -129,7 +139,7 @@ app/assets/javascripts/ckeditor/contents.css
|
|
|
129
139
|
|
|
130
140
|
#### Custom toolbars example
|
|
131
141
|
|
|
132
|
-
Adding custom toolbar:
|
|
142
|
+
Adding a custom toolbar:
|
|
133
143
|
|
|
134
144
|
```javascript
|
|
135
145
|
# in app/assets/javascripts/ckeditor/config.js
|
|
@@ -146,7 +156,7 @@ CKEDITOR.editorConfig = function (config) {
|
|
|
146
156
|
}
|
|
147
157
|
```
|
|
148
158
|
|
|
149
|
-
When overriding default `config.js` you
|
|
159
|
+
When overriding the default `config.js` file, you must set all configuration options yourself as the bundled `config.js` will not be loaded. To see the default configuration, run `bundle open ckeditor`, copy `app/assets/javascripts/ckeditor/config.js` into your project and customize it to your needs.
|
|
150
160
|
|
|
151
161
|
### Deployment
|
|
152
162
|
|
|
@@ -156,7 +166,7 @@ For Rails 4, add the following to `config/initializers/assets.rb`:
|
|
|
156
166
|
Rails.application.config.assets.precompile += %w( ckeditor/* )
|
|
157
167
|
```
|
|
158
168
|
|
|
159
|
-
|
|
169
|
+
As of version 4.1.0, non-digested assets of Ckeditor will simply be copied after digested assets were compiled.
|
|
160
170
|
For older versions, use gem [non-stupid-digest-assets](https://rubygems.org/gems/non-stupid-digest-assets), to copy non digest assets.
|
|
161
171
|
|
|
162
172
|
To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
|
|
@@ -170,7 +180,7 @@ Ckeditor.setup do |config|
|
|
|
170
180
|
end
|
|
171
181
|
```
|
|
172
182
|
|
|
173
|
-
Note that you have to list your plugins including all their dependencies.
|
|
183
|
+
Note that you have to list your plugins, including all their dependencies.
|
|
174
184
|
|
|
175
185
|
### Include customized CKEDITOR_BASEPATH setting
|
|
176
186
|
|
|
@@ -219,7 +229,7 @@ jQuery sample:
|
|
|
219
229
|
|
|
220
230
|
### CanCan integration
|
|
221
231
|
|
|
222
|
-
To use cancan with Ckeditor, add this to an initializer
|
|
232
|
+
To use cancan with Ckeditor, add this to an initializer:
|
|
223
233
|
|
|
224
234
|
```ruby
|
|
225
235
|
# in config/initializers/ckeditor.rb
|
|
@@ -230,7 +240,7 @@ end
|
|
|
230
240
|
```
|
|
231
241
|
|
|
232
242
|
At this point, all authorization will fail and no one will be able to access the filebrowser pages.
|
|
233
|
-
To grant access, add this to Ability#initialize
|
|
243
|
+
To grant access, add this to Ability#initialize:
|
|
234
244
|
|
|
235
245
|
```ruby
|
|
236
246
|
# Always performed
|
|
@@ -243,7 +253,7 @@ can [:read, :create, :destroy], Ckeditor::AttachmentFile
|
|
|
243
253
|
|
|
244
254
|
### Pundit integration
|
|
245
255
|
|
|
246
|
-
Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file
|
|
256
|
+
Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file:
|
|
247
257
|
|
|
248
258
|
```ruby
|
|
249
259
|
Ckeditor.setup do |config|
|
|
@@ -251,7 +261,7 @@ Ckeditor.setup do |config|
|
|
|
251
261
|
end
|
|
252
262
|
```
|
|
253
263
|
|
|
254
|
-
|
|
264
|
+
Then, generate the policy files for model **Picture** and **AttachmentFile**
|
|
255
265
|
|
|
256
266
|
```
|
|
257
267
|
$ rails g ckeditor:pundit_policy
|
|
@@ -260,9 +270,9 @@ By this command, you will got two files:
|
|
|
260
270
|
> app/policies/ckeditor/picture_policy.rb
|
|
261
271
|
app/policies/ckeditor/attachment_file_policy.rb
|
|
262
272
|
|
|
263
|
-
By default, only the user that logged in can access the models(with
|
|
273
|
+
By default, only the user that logged in can access the models (with actions *index* and *create*) and only the owner of the asset can **destroy** the resource.
|
|
264
274
|
|
|
265
|
-
You can
|
|
275
|
+
You can customize these two policy files as you like.
|
|
266
276
|
|
|
267
277
|
## I18n
|
|
268
278
|
|
|
@@ -291,4 +301,4 @@ $> rake test:integration
|
|
|
291
301
|
$> rake test:models
|
|
292
302
|
```
|
|
293
303
|
|
|
294
|
-
This project rocks and uses MIT-LICENSE.
|
|
304
|
+
This project rocks and uses the MIT-LICENSE.
|
|
@@ -26,7 +26,7 @@ img {
|
|
|
26
26
|
top: 0;
|
|
27
27
|
}
|
|
28
28
|
.gal-holder .gal-item .gal-del:hover {
|
|
29
|
-
-moz-opacity: 0.7;
|
|
29
|
+
-moz-opacity: 0.7;
|
|
30
30
|
-khtml-opacity: 0.7;
|
|
31
31
|
opacity: 0.7;
|
|
32
32
|
}
|
|
@@ -85,6 +85,10 @@ img {
|
|
|
85
85
|
overflow: hidden;
|
|
86
86
|
width: 500px;
|
|
87
87
|
}
|
|
88
|
+
.img-name {
|
|
89
|
+
word-wrap: break-word;
|
|
90
|
+
width: auto !important;
|
|
91
|
+
}
|
|
88
92
|
.gal-holder .gal-item .gal-inner-holder .img-data .time-size {
|
|
89
93
|
display: block;
|
|
90
94
|
overflow: hidden;
|
|
@@ -119,4 +123,4 @@ img {
|
|
|
119
123
|
|
|
120
124
|
.pagination, .pagination a {
|
|
121
125
|
text-decoration: none;
|
|
122
|
-
}
|
|
126
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
class Ckeditor::ApplicationController < ApplicationController
|
|
2
|
-
respond_to :html, :json
|
|
3
2
|
layout 'ckeditor/application'
|
|
4
3
|
|
|
5
4
|
before_filter :find_asset, :only => [:destroy]
|
|
@@ -15,18 +14,20 @@ class Ckeditor::ApplicationController < ApplicationController
|
|
|
15
14
|
callback = ckeditor_before_create_asset(asset)
|
|
16
15
|
|
|
17
16
|
if callback && asset.save
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
render :text => body
|
|
23
|
-
else
|
|
24
|
-
if params[:CKEditor]
|
|
17
|
+
if params[:CKEditor].blank?
|
|
18
|
+
render :json => asset.to_json(:only=>[:id, :type])
|
|
19
|
+
else
|
|
25
20
|
render :text => %Q"<script type='text/javascript'>
|
|
26
|
-
window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]},
|
|
21
|
+
window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, '#{config.relative_url_root}#{Ckeditor::Utils.escape_single_quotes(asset.url_content)}');
|
|
27
22
|
</script>"
|
|
23
|
+
end
|
|
24
|
+
else
|
|
25
|
+
if params[:CKEditor].blank?
|
|
26
|
+
render :nothing => true, :format => :json
|
|
28
27
|
else
|
|
29
|
-
render :
|
|
28
|
+
render :text => %Q"<script type='text/javascript'>
|
|
29
|
+
window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, null, '#{Ckeditor::Utils.escape_single_quotes(asset.errors.full_messages.first)}');
|
|
30
|
+
</script>"
|
|
30
31
|
end
|
|
31
32
|
end
|
|
32
33
|
end
|
|
@@ -4,7 +4,9 @@ class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
|
|
|
4
4
|
@attachments = Ckeditor.attachment_file_adapter.find_all(ckeditor_attachment_files_scope)
|
|
5
5
|
@attachments = Ckeditor::Paginatable.new(@attachments).page(params[:page])
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
respond_to do |format|
|
|
8
|
+
format.html { render :layout => @attachments.first_page? }
|
|
9
|
+
end
|
|
8
10
|
end
|
|
9
11
|
|
|
10
12
|
def create
|
|
@@ -14,7 +16,11 @@ class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
|
|
|
14
16
|
|
|
15
17
|
def destroy
|
|
16
18
|
@attachment.destroy
|
|
17
|
-
|
|
19
|
+
|
|
20
|
+
respond_to do |format|
|
|
21
|
+
format.html { redirect_to attachment_files_path }
|
|
22
|
+
format.json { render :nothing => true, :status => 204 }
|
|
23
|
+
end
|
|
18
24
|
end
|
|
19
25
|
|
|
20
26
|
protected
|
|
@@ -4,7 +4,9 @@ class Ckeditor::PicturesController < Ckeditor::ApplicationController
|
|
|
4
4
|
@pictures = Ckeditor.picture_adapter.find_all(ckeditor_pictures_scope)
|
|
5
5
|
@pictures = Ckeditor::Paginatable.new(@pictures).page(params[:page])
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
respond_to do |format|
|
|
8
|
+
format.html { render :layout => @pictures.first_page? }
|
|
9
|
+
end
|
|
8
10
|
end
|
|
9
11
|
|
|
10
12
|
def create
|
|
@@ -14,7 +16,11 @@ class Ckeditor::PicturesController < Ckeditor::ApplicationController
|
|
|
14
16
|
|
|
15
17
|
def destroy
|
|
16
18
|
@picture.destroy
|
|
17
|
-
|
|
19
|
+
|
|
20
|
+
respond_to do |format|
|
|
21
|
+
format.html { redirect_to pictures_path }
|
|
22
|
+
format.json { render :nothing => true, :status => 204 }
|
|
23
|
+
end
|
|
18
24
|
end
|
|
19
25
|
|
|
20
26
|
protected
|
data/lib/ckeditor.rb
CHANGED
|
@@ -58,6 +58,10 @@ module Ckeditor
|
|
|
58
58
|
mattr_accessor :assets
|
|
59
59
|
@@assets = nil
|
|
60
60
|
|
|
61
|
+
# Remove digest from ckeditor asset files while running assets:precompile task?
|
|
62
|
+
mattr_accessor :run_on_precompile
|
|
63
|
+
@@run_on_precompile = true
|
|
64
|
+
|
|
61
65
|
# Turn on/off filename parameterize
|
|
62
66
|
mattr_accessor :parameterize_filenames
|
|
63
67
|
@@parameterize_filenames = true
|
|
@@ -102,6 +106,10 @@ module Ckeditor
|
|
|
102
106
|
@@assets ||= Utils.select_assets("ckeditor", "vendor/assets/javascripts") << "ckeditor/init.js"
|
|
103
107
|
end
|
|
104
108
|
|
|
109
|
+
def self.run_on_precompile?
|
|
110
|
+
@@run_on_precompile
|
|
111
|
+
end
|
|
112
|
+
|
|
105
113
|
def self.picture_model(&block)
|
|
106
114
|
if block_given?
|
|
107
115
|
self.picture_model = block
|
|
@@ -2,24 +2,26 @@ module Ckeditor
|
|
|
2
2
|
module Backend
|
|
3
3
|
module Dragonfly
|
|
4
4
|
def self.included(base)
|
|
5
|
-
base.send(:
|
|
5
|
+
base.send(:extend, ::Dragonfly::Model)
|
|
6
|
+
base.send(:extend, ::Dragonfly::Model::Validations)
|
|
6
7
|
base.send(:extend, ClassMethods)
|
|
8
|
+
base.send(:include, InstanceMethods)
|
|
7
9
|
end
|
|
8
10
|
|
|
9
11
|
module ClassMethods
|
|
10
12
|
def attachment_file_types
|
|
11
|
-
@attachment_file_types ||= Ckeditor.attachment_file_types.map(&:
|
|
13
|
+
@attachment_file_types ||= Ckeditor.attachment_file_types.map(&:to_s).tap do |formats|
|
|
12
14
|
# This is not ideal but Dragonfly doesn't return double
|
|
13
15
|
# extensions. Having said that, the other backends
|
|
14
16
|
# currently don't use attachment_file_types at all.
|
|
15
|
-
[
|
|
16
|
-
formats << f if formats.include?("tar.#{f}"
|
|
17
|
+
[ 'bz2', 'gz', 'lzma', 'xz' ].each do |f|
|
|
18
|
+
formats << f if formats.include?("tar.#{f}")
|
|
17
19
|
end
|
|
18
20
|
end
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
def image_file_types
|
|
22
|
-
@image_file_types ||= Ckeditor.image_file_types.map(&:
|
|
24
|
+
@image_file_types ||= Ckeditor.image_file_types.map(&:to_s)
|
|
23
25
|
end
|
|
24
26
|
end
|
|
25
27
|
|
|
@@ -27,7 +29,7 @@ module Ckeditor
|
|
|
27
29
|
delegate :url, :path, :size, :image?, :width, :height, :to => :data
|
|
28
30
|
|
|
29
31
|
alias_attribute :data_file_name, :data_name
|
|
30
|
-
alias_attribute :data_content_type, :
|
|
32
|
+
alias_attribute :data_content_type, :"data.mime_type"
|
|
31
33
|
alias_attribute :data_file_size, :data_size
|
|
32
34
|
|
|
33
35
|
private
|
|
@@ -19,7 +19,10 @@ module Ckeditor
|
|
|
19
19
|
# action as a symbol (:create, :destroy, etc.). The second argument is the actual model
|
|
20
20
|
# instance if it is available.
|
|
21
21
|
def authorize(action, model_object = nil)
|
|
22
|
-
|
|
22
|
+
if action
|
|
23
|
+
@controller.instance_variable_set(:@_authorized, true)
|
|
24
|
+
@controller.current_ability.authorize!(action.to_sym, model_object)
|
|
25
|
+
end
|
|
23
26
|
end
|
|
24
27
|
|
|
25
28
|
# This method is called primarily from the view to determine whether the given user
|
data/lib/ckeditor/utils.rb
CHANGED
|
@@ -25,9 +25,9 @@ module Ckeditor
|
|
|
25
25
|
|
|
26
26
|
if options && !options.keys.empty?
|
|
27
27
|
js_options = ActiveSupport::JSON.encode(options)
|
|
28
|
-
js << "CKEDITOR.replace('#{dom_id}', #{js_options});"
|
|
28
|
+
js << "if (CKEDITOR.instances['#{dom_id}'] == undefined) { CKEDITOR.replace('#{dom_id}', #{js_options}); }"
|
|
29
29
|
else
|
|
30
|
-
js << "CKEDITOR.replace('#{dom_id}');"
|
|
30
|
+
js << "if (CKEDITOR.instances['#{dom_id}'] == undefined) { CKEDITOR.replace('#{dom_id}'); }"
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
js << "} else { setTimeout(arguments.callee, 50); } })();"
|
data/lib/ckeditor/version.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
class Ckeditor::AttachmentFile < Ckeditor::Asset
|
|
2
|
-
validates_property :
|
|
2
|
+
validates_property :ext, :of => :data, :in => attachment_file_types unless attachment_file_types.empty?
|
|
3
3
|
|
|
4
4
|
def url_thumb
|
|
5
5
|
Ckeditor::Utils.filethumb(filename)
|