glebtv-ckeditor 4.4.7.4 → 4.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +38 -0
- data/MIT-LICENSE +1 -1
- data/README.md +124 -84
- data/Rakefile +1 -25
- data/app/assets/javascripts/ckeditor/application.js +0 -1
- data/app/assets/javascripts/ckeditor/config.js.erb +5 -59
- data/app/assets/javascripts/ckeditor/config_orig.js +58 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/application.js.erb +58 -56
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +12 -6
- data/app/assets/javascripts/ckeditor/init.js.erb +6 -1
- data/app/assets/stylesheets/ckcontent.css +0 -0
- data/app/assets/stylesheets/ckeditor/application.css +0 -0
- data/app/controllers/ckeditor/application_controller.rb +6 -17
- data/app/controllers/ckeditor/attachment_files_controller.rb +10 -3
- data/app/controllers/ckeditor/pictures_controller.rb +9 -2
- data/app/helpers/ckeditor/application_helper.rb +0 -0
- data/app/views/ckeditor/attachment_files/index.html.erb +3 -3
- data/app/views/ckeditor/pictures/index.html.erb +3 -3
- data/app/views/ckeditor/shared/_asset.html.erb +0 -0
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +0 -0
- data/app/views/layouts/ckeditor/application.html.erb +3 -2
- data/app/views/rails_admin/main/_form_ck_editor.html.haml +1 -1
- data/app/views/rails_admin/main/_form_ck_editorml.html.haml +1 -1
- data/config/locales/bg.ckeditor.yml +9 -0
- data/config/locales/cs.ckeditor.yml +0 -0
- data/config/locales/de.ckeditor.yml +0 -0
- data/config/locales/el-GR.cdkeditor.yml +0 -0
- data/config/locales/en.ckeditor.yml +0 -0
- data/config/locales/es.ckeditor.yml +0 -0
- data/config/locales/fr.ckeditor.yml +0 -0
- data/config/locales/hu.ckeditor.yml +0 -0
- data/config/locales/it.ckeditor.yml +0 -0
- data/config/locales/ja.ckeditor.yml +9 -0
- data/config/locales/nb.ckeditor.yml +9 -0
- data/config/locales/nl.ckeditor.yml +0 -0
- data/config/locales/pl.ckeditor.yml +0 -0
- data/config/locales/pt-BR.ckeditor.yml +0 -0
- data/config/locales/pt-PT.ckeditor.yml +0 -0
- data/config/locales/ru.ckeditor.yml +0 -0
- data/config/locales/sv-SE.ckeditor.yml +0 -0
- data/config/locales/tr.ckeditor.yml +9 -0
- data/config/locales/uk.ckeditor.yml +0 -0
- data/config/locales/zh-CN.ckeditor.yml +1 -1
- data/config/locales/zh-TW.ckeditor.yml +9 -0
- data/config/routes.rb +0 -0
- data/lib/ckeditor.rb +39 -5
- data/lib/ckeditor/asset_response.rb +59 -0
- data/lib/ckeditor/backend/carrierwave.rb +1 -8
- data/lib/ckeditor/backend/dragonfly.rb +8 -6
- data/lib/ckeditor/backend/paperclip.rb +7 -11
- data/lib/ckeditor/backend/refile.rb +37 -0
- data/lib/ckeditor/engine.rb +4 -0
- data/lib/ckeditor/helpers/controllers.rb +0 -0
- data/lib/ckeditor/helpers/form_builder.rb +0 -0
- data/lib/ckeditor/helpers/form_helper.rb +0 -0
- data/lib/ckeditor/helpers/view_helper.rb +0 -0
- data/lib/ckeditor/hooks/cancan.rb +4 -1
- data/lib/ckeditor/hooks/formtastic.rb +0 -0
- data/lib/ckeditor/hooks/pundit.rb +0 -0
- data/lib/ckeditor/hooks/simple_form.rb +1 -1
- data/lib/ckeditor/http.rb +1 -3
- data/lib/ckeditor/orm/active_record.rb +0 -0
- data/lib/ckeditor/orm/base.rb +0 -0
- data/lib/ckeditor/orm/mongoid.rb +0 -0
- data/lib/ckeditor/paginatable.rb +0 -0
- data/lib/ckeditor/text_area.rb +2 -1
- data/lib/ckeditor/utils.rb +26 -23
- data/lib/ckeditor/utils/content_type_detector.rb +41 -0
- data/lib/ckeditor/utils/javascript_code.rb +10 -0
- data/lib/ckeditor/version.rb +4 -2
- data/lib/generators/ckeditor/install_generator.rb +1 -1
- data/lib/generators/ckeditor/pundit_policy_generator.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +0 -0
- 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/active_record/dragonfly/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +3 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +7 -7
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +4 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +7 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +11 -0
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +28 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +2 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +0 -0
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +13 -19
- data/lib/generators/ckeditor/templates/ckeditor.rb +23 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +3 -6
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +3 -5
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +3 -3
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +3 -3
- data/lib/glebtv-ckeditor.rb +0 -0
- data/lib/tasks/ckeditor.rake +26 -0
- data/test/controllers/attachment_files_controller_test.rb +2 -2
- data/test/controllers/pictures_controller_test.rb +3 -4
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -1
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -1
- data/test/dummy/app/controllers/posts_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/helpers/posts_helper.rb +0 -0
- data/test/dummy/app/models/post.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +2 -2
- data/test/dummy/app/views/posts/_form.html.erb +0 -0
- data/test/dummy/app/views/posts/edit.html.erb +0 -0
- data/test/dummy/app/views/posts/index.html.erb +0 -0
- data/test/dummy/app/views/posts/new.html.erb +0 -0
- data/test/dummy/app/views/posts/show.html.erb +0 -0
- data/test/dummy/config.ru +0 -0
- data/test/dummy/config/application.rb +15 -15
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +0 -0
- data/test/dummy/config/environments/production.rb +0 -0
- data/test/dummy/config/environments/test.rb +7 -5
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/ckeditor.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/mongoid.yml +135 -1
- data/test/dummy/config/routes.rb +3 -3
- data/test/dummy/config/secrets.yml +8 -0
- data/test/dummy/db/migrate/20110623120047_create_posts.rb +1 -1
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -0
- data/test/dummy/test/fixtures/files/rails.png +0 -0
- data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
- data/test/functional/posts_controller_test.rb +6 -6
- data/test/generators/install_generator_test.rb +14 -0
- data/test/integration/navigation_test.rb +0 -0
- data/test/models/attachment_file_test.rb +2 -2
- data/test/{ckeditor_test.rb → models/ckeditor_test.rb} +35 -0
- data/test/models/picture_test.rb +6 -1
- data/test/models/utils_test.rb +6 -6
- data/test/orm/active_record.rb +0 -0
- data/test/orm/mongoid.rb +0 -0
- data/test/support/helpers.rb +0 -0
- data/test/support/integration_case.rb +0 -0
- data/test/support/raw_post.rb +0 -0
- data/test/support/routes.txt +0 -0
- data/test/test_helper.rb +3 -5
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +159 -3
- data/vendor/assets/javascripts/ckeditor/README.md +39 -0
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +7 -7
- data/vendor/assets/javascripts/ckeditor/build-config.js +4 -3
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +1028 -964
- data/vendor/assets/javascripts/ckeditor/config.js +1 -1
- data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +9 -8
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autocomplete.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/commentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +49 -29
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +7 -8
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +33 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +4 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +95 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neo.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css +35 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +65 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/zenburn.css +37 -0
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +10 -10
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +8 -8
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +16 -16
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +14 -14
- data/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +15 -15
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +6 -5
- data/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +29 -34
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +41 -40
- data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +22 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +2 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +81 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +30 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +20 -20
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +131 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +7 -0
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +923 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +29 -28
- data/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -28
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -17
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +8 -7
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +10 -10
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +9 -3
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +17 -17
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -2
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +4 -2
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +286 -145
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +88 -70
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +7 -7
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +388 -388
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/spinner.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +49 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
- metadata +105 -130
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +0 -4
- data/app/assets/javascripts/ckeditor/override.js.erb +0 -21
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/support/controller_hooks.rb +0 -27
- data/vendor/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -63
- data/vendor/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -30
- data/vendor/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -187
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -64
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +0 -771
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +0 -812
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +0 -844
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +0 -825
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +0 -816
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +0 -2136
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +0 -2145
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +0 -2194
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +0 -2362
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +0 -2206
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +0 -2254
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 967cf72a5f9af7fb06496ce628df448c7b51ca19
|
4
|
+
data.tar.gz: 451401d91a449eda8aa22aa54e6025fabd7f10e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6885c65b42dbcbb02f18ea60994357bfd756ef81946adb86ad76c35126624a3fcd39e5817a9dd522b53a900b1271c905e1dd42f732c0d98189178035550d367
|
7
|
+
data.tar.gz: 30938c904d109f67c8589115aa70c81b3388278a9b007b249169fce4d37db7ec899abfb176027b2b1fee4be1f462d822b3897b83bd836d9a1c940357d81007c0
|
data/Gemfile
CHANGED
@@ -2,3 +2,41 @@ source "http://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
+
gem "rails", "4.2.4"
|
6
|
+
|
7
|
+
platforms :mri_18 do
|
8
|
+
group :test do
|
9
|
+
gem 'ruby-debug'
|
10
|
+
gem 'SystemTimer'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
platforms :ruby do
|
15
|
+
gem "sqlite3"
|
16
|
+
|
17
|
+
group :development do
|
18
|
+
gem "unicorn", "~> 4.0.1"
|
19
|
+
end
|
20
|
+
|
21
|
+
group :development, :test do
|
22
|
+
gem 'jquery-rails', '~> 4.0.4'
|
23
|
+
gem "capybara", ">= 0.4.0"
|
24
|
+
gem "mynyml-redgreen", "~> 0.7.1", :require => 'redgreen'
|
25
|
+
end
|
26
|
+
|
27
|
+
group :active_record do
|
28
|
+
gem 'paperclip'
|
29
|
+
gem "carrierwave"
|
30
|
+
gem "dragonfly"
|
31
|
+
gem "mini_magick"
|
32
|
+
gem "refile", require: "refile/rails"
|
33
|
+
gem "refile-mini_magick"
|
34
|
+
end
|
35
|
+
|
36
|
+
group :mongoid do
|
37
|
+
gem 'mongoid', '~> 5.0.0'
|
38
|
+
gem "bson_ext"
|
39
|
+
gem 'mongoid-paperclip', :require => 'mongoid_paperclip'
|
40
|
+
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
|
41
|
+
end
|
42
|
+
end
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,44 +1,45 @@
|
|
1
|
-
# About this fork
|
2
|
-
|
3
|
-
This fork adds nothing except plugins and default config file I need.
|
4
|
-
All languages except en and ru are removed.
|
5
|
-
|
6
|
-
Please use [original gem](https://github.com/galetahub/ckeditor) instead.
|
7
|
-
|
8
1
|
# Ckeditor
|
9
2
|
|
10
|
-
|
3
|
+
[![Build Status](https://semaphoreci.com/api/v1/projects/9c3e4e36-9716-4362-aaa5-ef9644c72313/565007/badge.svg)](https://semaphoreci.com/igor-galeta/ckeditor)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/galetahub/ckeditor/badges/gpa.svg)](https://codeclimate.com/github/galetahub/ckeditor)
|
5
|
+
|
6
|
+
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.
|
11
7
|
[ckeditor.com](http://ckeditor.com/)
|
12
8
|
|
13
9
|
## Features
|
14
10
|
|
15
|
-
* Ckeditor version 4.
|
11
|
+
* Ckeditor version 4.5.6 (9 Dec 2015)
|
16
12
|
* Rails 4 integration
|
17
13
|
* Files browser
|
18
|
-
* HTML5
|
14
|
+
* HTML5 file uploader
|
19
15
|
* Hooks for formtastic and simple_form forms generators
|
20
16
|
* Integrated with authorization framework CanCan and Pundit
|
21
17
|
|
22
18
|
## Installation
|
23
19
|
|
24
|
-
For basic usage just include ckeditor gem:
|
20
|
+
For basic usage just include the ckeditor gem:
|
25
21
|
|
26
22
|
```
|
27
|
-
gem '
|
23
|
+
gem 'ckeditor'
|
28
24
|
```
|
29
25
|
|
26
|
+
or if you'd like to use the latest version from Github:
|
27
|
+
|
28
|
+
```
|
29
|
+
gem 'ckeditor', github: 'galetahub/ckeditor'
|
30
|
+
```
|
30
31
|
|
31
|
-
For
|
32
|
-
|
32
|
+
For file upload support, you must generate the necessary file storage models.
|
33
|
+
The currently supported backends are:
|
33
34
|
|
34
35
|
* ActiveRecord (paperclip, carrierwave, dragonfly)
|
35
36
|
* Mongoid (paperclip, carrierwave, dragonfly)
|
36
37
|
|
37
|
-
### How generate models
|
38
|
+
### How to generate models to store uploaded files
|
38
39
|
|
39
40
|
#### ActiveRecord + paperclip
|
40
41
|
|
41
|
-
|
42
|
+
To use the active_record orm with paperclip (i.e. the default settings):
|
42
43
|
|
43
44
|
```
|
44
45
|
gem 'paperclip'
|
@@ -55,6 +56,25 @@ gem 'mini_magick'
|
|
55
56
|
rails generate ckeditor:install --orm=active_record --backend=carrierwave
|
56
57
|
```
|
57
58
|
|
59
|
+
#### ActiveRecord + refile
|
60
|
+
|
61
|
+
```
|
62
|
+
gem 'refile', require: "refile/rails"
|
63
|
+
gem 'refile-mini_magick'
|
64
|
+
|
65
|
+
rails generate ckeditor:install --orm=active_record --backend=refile
|
66
|
+
```
|
67
|
+
|
68
|
+
#### ActiveRecord + dragonfly
|
69
|
+
|
70
|
+
Requires Dragonfly 1.0 or greater.
|
71
|
+
|
72
|
+
```
|
73
|
+
gem 'dragonfly'
|
74
|
+
|
75
|
+
rails generate ckeditor:install --orm=active_record --backend=dragonfly
|
76
|
+
```
|
77
|
+
|
58
78
|
#### Mongoid + paperclip
|
59
79
|
|
60
80
|
```
|
@@ -74,14 +94,14 @@ rails generate ckeditor:install --orm=mongoid --backend=carrierwave
|
|
74
94
|
|
75
95
|
#### Load generated models
|
76
96
|
|
77
|
-
All ckeditor models will be generated
|
78
|
-
|
97
|
+
All ckeditor models will be generated in the app/models/ckeditor directory.
|
98
|
+
Models are autoloaded in Rails 4. For earlier Rails versions, you need to add them to the autoload path (in application.rb):
|
79
99
|
|
80
100
|
```ruby
|
81
101
|
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
|
82
102
|
```
|
83
103
|
|
84
|
-
Mount
|
104
|
+
Mount the Ckeditor::Engine in your routes (config/routes.rb):
|
85
105
|
|
86
106
|
```ruby
|
87
107
|
mount Ckeditor::Engine => '/ckeditor'
|
@@ -89,85 +109,85 @@ mount Ckeditor::Engine => '/ckeditor'
|
|
89
109
|
|
90
110
|
## Usage
|
91
111
|
|
92
|
-
|
112
|
+
### Load editor from gem vendor
|
113
|
+
|
114
|
+
Include ckeditor javascripts in your `app/assets/javascripts/application.js`:
|
93
115
|
|
94
116
|
```
|
95
117
|
//= require ckeditor/init
|
96
118
|
```
|
97
119
|
|
98
|
-
|
120
|
+
### Load editor via CKEditor CDN
|
99
121
|
|
100
|
-
|
101
|
-
<%= form_for @page do |form| -%>
|
102
|
-
...
|
103
|
-
<%= form.cktext_area :notes, :class => 'someclass', :ckeditor => {:language => 'uk'} %>
|
104
|
-
...
|
105
|
-
<%= form.cktext_area :content, :value => 'Default value', :id => 'sometext' %>
|
106
|
-
...
|
107
|
-
<%= cktext_area :page, :info, :cols => 40, :ckeditor => {:uiColor => '#AADC6E', :toolbar => 'mini'} %>
|
108
|
-
...
|
109
|
-
<% end -%>
|
110
|
-
```
|
122
|
+
Setup editor version to load (more info here http://cdn.ckeditor.com/)
|
111
123
|
|
112
|
-
|
124
|
+
```ruby
|
125
|
+
# in config/initializers/ckeditor.rb
|
126
|
+
|
127
|
+
Ckeditor.setup do |config|
|
128
|
+
# //cdn.ckeditor.com/<version.number>/<distribution>/ckeditor.js
|
129
|
+
config.cdn_url = "//cdn.ckeditor.com/4.5.6/standard/ckeditor.js"
|
130
|
+
end
|
131
|
+
```
|
113
132
|
|
114
|
-
In
|
133
|
+
In view template include ckeditor CDN:
|
115
134
|
|
135
|
+
```slim
|
136
|
+
= javascript_include_tag Ckeditor.cdn_url
|
116
137
|
```
|
117
|
-
app/assets/javascripts/ckeditor/config.js
|
118
138
|
|
119
|
-
|
139
|
+
### Form helpers
|
140
|
+
|
141
|
+
```slim
|
142
|
+
= form_for @page do |form|
|
143
|
+
= form.cktext_area :notes, :class => 'someclass', :ckeditor => {:language => 'uk'}
|
144
|
+
= form.cktext_area :content, :value => 'Default value', :id => 'sometext'
|
145
|
+
= cktext_area :page, :info, :cols => 40, :ckeditor => {:uiColor => '#AADC6E', :toolbar => 'mini'}
|
120
146
|
```
|
121
147
|
|
122
|
-
###
|
148
|
+
### Customize ckeditor
|
123
149
|
|
124
|
-
|
150
|
+
All ckeditor options can be found [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
|
125
151
|
|
126
|
-
|
152
|
+
In order to configure the ckeditor default options, create the following files:
|
127
153
|
|
128
154
|
```
|
129
|
-
|
155
|
+
app/assets/javascripts/ckeditor/config.js
|
156
|
+
|
157
|
+
app/assets/javascripts/ckeditor/contents.css
|
130
158
|
```
|
131
159
|
|
132
|
-
|
160
|
+
#### Custom toolbars example
|
133
161
|
|
134
|
-
|
135
|
-
to determine path to assets. Therefore we have to create a rake task thats copies the original assets and creates a non-digest version of it. Some example of such rake task is:
|
162
|
+
Adding a custom toolbar:
|
136
163
|
|
137
|
-
```
|
138
|
-
|
139
|
-
desc 'Create nondigest versions of some ckeditor assets (e.g. moono skin png)'
|
140
|
-
task :create_nondigest_assets do
|
141
|
-
fingerprint = /\-[0-9a-f]{32}\./
|
142
|
-
for file in Dir['public/assets/ckeditor/contents-*.css', 'public/assets/ckeditor/skins/moono/*.png']
|
143
|
-
next unless file =~ fingerprint
|
144
|
-
nondigest = file.sub fingerprint, '.' # contents-0d8ffa186a00f5063461bc0ba0d96087.css => contents.css
|
145
|
-
FileUtils.cp file, nondigest, verbose: true
|
146
|
-
end
|
147
|
-
end
|
148
|
-
end
|
164
|
+
```javascript
|
165
|
+
# in app/assets/javascripts/ckeditor/config.js
|
149
166
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
167
|
+
CKEDITOR.editorConfig = function (config) {
|
168
|
+
// ... other configuration ...
|
169
|
+
|
170
|
+
config.toolbar_mini = [
|
171
|
+
["Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript"],
|
172
|
+
];
|
173
|
+
config.toolbar = "simple";
|
174
|
+
|
175
|
+
// ... rest of the original config.js ...
|
176
|
+
}
|
154
177
|
```
|
155
|
-
This also works on heroku. Even after restarting dynos running on a cedar stack, the assets will remain.
|
156
178
|
|
157
|
-
|
179
|
+
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.
|
180
|
+
|
181
|
+
### Deployment (only if you use ckeditor from gem vendor)
|
182
|
+
|
183
|
+
For Rails 4, add the following to `config/initializers/assets.rb`:
|
158
184
|
|
159
185
|
```ruby
|
160
|
-
|
161
|
-
task :copy_nondigest_assets, roles: :app do
|
162
|
-
run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} ckeditor:create_nondigest_assets"
|
163
|
-
end
|
164
|
-
after 'deploy:assets:precompile', 'copy_nondigest_assets'
|
186
|
+
Rails.application.config.assets.precompile += %w( ckeditor/* )
|
165
187
|
```
|
166
188
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
Also you can use gem [non-stupid-digest-assets](https://rubygems.org/gems/non-stupid-digest-assets), which do the same work.
|
189
|
+
As of version 4.1.0, non-digested assets of Ckeditor will simply be copied after digested assets were compiled.
|
190
|
+
For older versions, use gem [non-stupid-digest-assets](https://rubygems.org/gems/non-stupid-digest-assets), to copy non digest assets.
|
171
191
|
|
172
192
|
To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
|
173
193
|
|
@@ -180,6 +200,24 @@ Ckeditor.setup do |config|
|
|
180
200
|
end
|
181
201
|
```
|
182
202
|
|
203
|
+
Note that you have to list your plugins, including all their dependencies.
|
204
|
+
|
205
|
+
### Include customized CKEDITOR_BASEPATH setting
|
206
|
+
|
207
|
+
Add your app/assets/javascripts/ckeditor/basepath.js.erb like
|
208
|
+
|
209
|
+
```erb
|
210
|
+
<%
|
211
|
+
base_path = ''
|
212
|
+
if ENV['PROJECT'] =~ /editor/i
|
213
|
+
base_path << "/#{Rails.root.basename.to_s}/"
|
214
|
+
end
|
215
|
+
base_path << Rails.application.config.assets.prefix
|
216
|
+
base_path << '/ckeditor/'
|
217
|
+
%>
|
218
|
+
var CKEDITOR_BASEPATH = '<%= base_path %>';
|
219
|
+
```
|
220
|
+
|
183
221
|
### AJAX
|
184
222
|
|
185
223
|
jQuery sample:
|
@@ -198,20 +236,20 @@ jQuery sample:
|
|
198
236
|
|
199
237
|
### Formtastic integration
|
200
238
|
|
201
|
-
```
|
202
|
-
|
203
|
-
|
239
|
+
```slim
|
240
|
+
= form.input :content, :as => :ckeditor
|
241
|
+
= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => { :height => 400 } }
|
204
242
|
```
|
205
243
|
|
206
244
|
### SimpleForm integration
|
207
245
|
|
208
|
-
```
|
209
|
-
|
246
|
+
```slim
|
247
|
+
= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} }
|
210
248
|
```
|
211
249
|
|
212
250
|
### CanCan integration
|
213
251
|
|
214
|
-
To use cancan with Ckeditor, add this to an initializer
|
252
|
+
To use cancan with Ckeditor, add this to an initializer:
|
215
253
|
|
216
254
|
```ruby
|
217
255
|
# in config/initializers/ckeditor.rb
|
@@ -222,7 +260,7 @@ end
|
|
222
260
|
```
|
223
261
|
|
224
262
|
At this point, all authorization will fail and no one will be able to access the filebrowser pages.
|
225
|
-
To grant access, add this to Ability#initialize
|
263
|
+
To grant access, add this to Ability#initialize:
|
226
264
|
|
227
265
|
```ruby
|
228
266
|
# Always performed
|
@@ -235,7 +273,7 @@ can [:read, :create, :destroy], Ckeditor::AttachmentFile
|
|
235
273
|
|
236
274
|
### Pundit integration
|
237
275
|
|
238
|
-
Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file
|
276
|
+
Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file:
|
239
277
|
|
240
278
|
```ruby
|
241
279
|
Ckeditor.setup do |config|
|
@@ -243,7 +281,7 @@ Ckeditor.setup do |config|
|
|
243
281
|
end
|
244
282
|
```
|
245
283
|
|
246
|
-
|
284
|
+
Then, generate the policy files for model **Picture** and **AttachmentFile**
|
247
285
|
|
248
286
|
```
|
249
287
|
$ rails g ckeditor:pundit_policy
|
@@ -252,9 +290,9 @@ By this command, you will got two files:
|
|
252
290
|
> app/policies/ckeditor/picture_policy.rb
|
253
291
|
app/policies/ckeditor/attachment_file_policy.rb
|
254
292
|
|
255
|
-
By default, only the user that logged in can access the models(with
|
293
|
+
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.
|
256
294
|
|
257
|
-
You can
|
295
|
+
You can customize these two policy files as you like.
|
258
296
|
|
259
297
|
## I18n
|
260
298
|
|
@@ -273,9 +311,11 @@ en:
|
|
273
311
|
## Tests
|
274
312
|
|
275
313
|
```bash
|
276
|
-
$> rake test
|
277
|
-
$> rake test CKEDITOR_ORM=mongoid
|
314
|
+
$> rake test CKEDITOR_BACKEND=paperclip
|
278
315
|
$> rake test CKEDITOR_BACKEND=carrierwave
|
316
|
+
$> rake test CKEDITOR_BACKEND=refile
|
317
|
+
$> rake test CKEDITOR_BACKEND=dragonfly
|
318
|
+
$> rake test CKEDITOR_ORM=mongoid
|
279
319
|
|
280
320
|
$> rake test:controllers
|
281
321
|
$> rake test:generators
|
@@ -283,4 +323,4 @@ $> rake test:integration
|
|
283
323
|
$> rake test:models
|
284
324
|
```
|
285
325
|
|
286
|
-
This project rocks and uses MIT-LICENSE.
|
326
|
+
This project rocks and uses the MIT-LICENSE.
|
data/Rakefile
CHANGED
@@ -6,10 +6,9 @@ rescue LoadError
|
|
6
6
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
7
|
end
|
8
8
|
|
9
|
-
require "bundler/gem_tasks"
|
10
|
-
|
11
9
|
require 'rake'
|
12
10
|
require 'rdoc/task'
|
11
|
+
require "bundler/gem_tasks"
|
13
12
|
|
14
13
|
require 'rake/testtask'
|
15
14
|
|
@@ -64,26 +63,3 @@ RDoc::Task.new do |rdoc|
|
|
64
63
|
rdoc.rdoc_files.include('README.rdoc')
|
65
64
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
66
65
|
end
|
67
|
-
|
68
|
-
desc "prepare ckeditor CSS"
|
69
|
-
task :process_css do
|
70
|
-
path = File.expand_path("../vendor/assets/javascripts/ckeditor/skins/moono", __FILE__).to_s
|
71
|
-
|
72
|
-
Dir.glob("#{path}/*.css").each do |f|
|
73
|
-
puts f
|
74
|
-
cmd = "sass-convert -F css -T scss #{f} #{f}.scss"
|
75
|
-
unless system(cmd)
|
76
|
-
puts cmd
|
77
|
-
raise 'sass convert error'
|
78
|
-
end
|
79
|
-
File.delete(f)
|
80
|
-
end
|
81
|
-
Dir.glob("#{path}/*.scss").each do |f|
|
82
|
-
puts f
|
83
|
-
text = File.read(f)
|
84
|
-
text = text.gsub(/ url\((.*)\)/, ' image-url("ckeditor/skins/moono/\1")')
|
85
|
-
File.write(f, text)
|
86
|
-
#File.write(f.gsub('.scss', '.css.scss'), text)
|
87
|
-
#File.delete(f)
|
88
|
-
end
|
89
|
-
end
|