glebtv-ckeditor 4.6.0 → 4.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +15 -22
- data/MIT-LICENSE +0 -0
- data/README.md +2 -325
- data/Rakefile +1 -2
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.jpg +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.png +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_del.png +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_more.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/preloader.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/avi.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/ckfnothumb.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/doc.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/docx.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/exe.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/gz.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/htm.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/jpg.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mp3.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/mpg.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/pdf.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/psd.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/rar.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/swf.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/tar.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/txt.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/unknown.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/wmv.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xls.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/xlsx.gif +0 -0
- data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/thumbs/zip.gif +0 -0
- data/app/assets/javascripts/ckeditor/application.js +0 -0
- data/app/assets/javascripts/ckeditor/config.js.erb +1 -2
- data/app/assets/javascripts/ckeditor/filebrowser/javascripts/{application.js.erb → application.js} +4 -6
- 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/init.js.erb +0 -0
- data/app/assets/stylesheets/ckeditor/application.css +1 -1
- data/app/assets/stylesheets/ckeditor/filebrowser/uploader.scss +172 -0
- data/app/controllers/ckeditor/application_controller.rb +9 -10
- data/app/controllers/ckeditor/attachment_files_controller.rb +11 -12
- data/app/controllers/ckeditor/pictures_controller.rb +10 -12
- data/app/helpers/ckeditor/application_helper.rb +1 -10
- data/app/views/ckeditor/attachment_files/index.html.erb +5 -5
- data/app/views/ckeditor/pictures/index.html.erb +5 -5
- data/app/views/ckeditor/shared/_asset.html.erb +18 -21
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +17 -20
- data/app/views/layouts/ckeditor/application.html.erb +3 -3
- data/config/locales/en.ckeditor.yml +0 -0
- data/config/locales/ru.ckeditor.yml +0 -0
- data/config/routes.rb +2 -2
- data/lib/ckeditor.rb +42 -34
- data/lib/ckeditor/asset_response.rb +74 -25
- data/lib/ckeditor/backend/carrierwave.rb +8 -5
- data/lib/ckeditor/backend/dragonfly.rb +5 -3
- data/lib/ckeditor/backend/paperclip.rb +15 -22
- data/lib/ckeditor/backend/refile.rb +6 -4
- data/lib/ckeditor/helpers/controllers.rb +15 -20
- data/lib/ckeditor/helpers/form_builder.rb +1 -1
- data/lib/ckeditor/helpers/form_helper.rb +0 -0
- data/lib/ckeditor/helpers/view_helper.rb +0 -0
- data/lib/ckeditor/hooks/cancan.rb +0 -2
- data/lib/ckeditor/hooks/formtastic.rb +2 -2
- data/lib/ckeditor/hooks/pundit.rb +1 -4
- data/lib/ckeditor/hooks/simple_form.rb +9 -14
- data/lib/ckeditor/http.rb +9 -11
- data/lib/ckeditor/orm/active_record.rb +1 -3
- data/lib/ckeditor/orm/base.rb +5 -5
- data/lib/ckeditor/orm/mongoid.rb +4 -6
- data/lib/ckeditor/paginatable.rb +3 -1
- data/lib/ckeditor/rails.rb +39 -0
- data/lib/ckeditor/text_area.rb +16 -15
- data/lib/ckeditor/utils.rb +45 -39
- data/lib/ckeditor/utils/content_type_detector.rb +7 -10
- data/lib/ckeditor/utils/javascript_code.rb +8 -3
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/install_generator.rb +52 -30
- data/lib/generators/ckeditor/pundit_policy_generator.rb +1 -3
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +6 -10
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration_versioned.rb +22 -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 +4 -4
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +6 -10
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration_versioned.rb +23 -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 -3
- data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +5 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +2 -5
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration_versioned.rb +23 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +0 -0
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +7 -12
- data/lib/generators/ckeditor/templates/active_record/refile/migration_versioned.rb +23 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +0 -0
- data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +4 -4
- data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +4 -5
- data/lib/generators/ckeditor/templates/ckeditor.rb +16 -7
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +2 -2
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +1 -1
- data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +1 -1
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +5 -5
- data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +5 -5
- data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +2 -2
- data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +2 -2
- data/lib/glebtv-ckeditor.rb +0 -0
- data/lib/tasks/ckeditor.rake +6 -14
- data/test/controllers/attachment_files_controller_test.rb +0 -0
- data/test/controllers/pictures_controller_test.rb +0 -0
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- 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 -0
- 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 +0 -0
- 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 +0 -0
- 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 +0 -0
- data/test/dummy/config/initializers/assets.rb +1 -0
- 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 +0 -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/paperclip.rb +3 -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 +0 -0
- data/test/dummy/config/routes.rb +0 -0
- data/test/dummy/config/secrets.yml +0 -0
- data/test/dummy/db/migrate/20110623120047_create_posts.rb +0 -0
- 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 +2 -3
- data/test/generators/install_generator_test.rb +2 -2
- data/test/integration/navigation_test.rb +0 -0
- data/test/models/attachment_file_test.rb +3 -8
- data/test/models/ckeditor_test.rb +1 -1
- data/test/models/picture_test.rb +0 -0
- 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 +1 -1
- data/vendor/assets/javascripts/ckeditor/CHANGES.md +1358 -0
- data/vendor/assets/javascripts/ckeditor/README.md +39 -0
- data/vendor/assets/javascripts/ckeditor/build-config.js +31 -30
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +709 -675
- data/vendor/assets/javascripts/ckeditor/config.js +10 -0
- data/vendor/assets/javascripts/ckeditor/contents.css +208 -0
- data/vendor/assets/javascripts/ckeditor/lang/en.js +4 -4
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -2
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +2 -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 +6 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +2 -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 +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.twig.min.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +230 -74
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/abcdef.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +2 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/icecoder.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/material.css +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +0 -2
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/seti.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/yeti.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +2 -2
- 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/lineheight/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +23 -23
- 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 +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +13 -7
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +49 -39
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +33 -19
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +6 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +92 -23
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +81 -82
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon-hdpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -448
- data/vendor/assets/javascripts/ckeditor/samples/css/samples.css +1632 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/github-top.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/header-bg.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/header-separator.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/img/navigation-tip.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/samples/js/sample.js +53 -0
- data/vendor/assets/javascripts/ckeditor/samples/js/sf.js +17 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/ajax.html +85 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/api.html +210 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/appendto.html +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +204 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/posteddata.php +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/sample.jpg +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/datafiltering.html +508 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/dialog/assets/my_dialog.js +48 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/dialog/dialog.html +190 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/divreplace.html +144 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/enterkey/enterkey.html +106 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js +19 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputforflash.html +283 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/htmlwriter/outputhtml.html +224 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/index.html +131 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/inlineall.html +314 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/inlinebycode.html +124 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/inlinetextarea.html +113 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/jquery.html +103 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/magicline/magicline.html +209 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/readonly.html +76 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/replacebyclass.html +60 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/replacebycode.html +59 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/sample.css +357 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/sample.js +50 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/sample_posteddata.php +16 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/tabindex.html +78 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/toolbar/toolbar.html +235 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/uicolor.html +72 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/uilanguages.html +122 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
- data/vendor/assets/javascripts/ckeditor/samples/old/xhtmlstyle.html +234 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/index.html +446 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
- data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/LICENSE.md → samples/toolbarconfigurator/lib/codemirror/LICENSE} +19 -21
- data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/css → samples/toolbarconfigurator/lib/codemirror}/codemirror.css +325 -341
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
- data/vendor/assets/javascripts/ckeditor/{plugins/codemirror/js/addon/hint → samples/toolbarconfigurator/lib/codemirror}/show-hint.css +38 -36
- data/vendor/assets/javascripts/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/minimalist/readme.md +7 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons16.svg +2374 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/icons32.svg +2722 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dev/locations.json +145 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +1 -1
- 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/skin.js +10 -0
- data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
- metadata +182 -177
- data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +0 -128
- data/app/views/rails_admin/main/_form_ck_editor.html.haml +0 -10
- data/app/views/rails_admin/main/_form_ck_editorml.html.haml +0 -11
- data/config/locales/bg.ckeditor.yml +0 -9
- data/config/locales/cs.ckeditor.yml +0 -9
- data/config/locales/de.ckeditor.yml +0 -9
- data/config/locales/el-GR.cdkeditor.yml +0 -9
- data/config/locales/es.ckeditor.yml +0 -9
- data/config/locales/fr.ckeditor.yml +0 -9
- data/config/locales/hu.ckeditor.yml +0 -9
- data/config/locales/it.ckeditor.yml +0 -9
- data/config/locales/ja.ckeditor.yml +0 -9
- data/config/locales/nb.ckeditor.yml +0 -9
- data/config/locales/nl.ckeditor.yml +0 -9
- data/config/locales/pl.ckeditor.yml +0 -9
- data/config/locales/pt-BR.ckeditor.yml +0 -9
- data/config/locales/pt-PT.ckeditor.yml +0 -9
- data/config/locales/sv-SE.ckeditor.yml +0 -9
- data/config/locales/tr.ckeditor.yml +0 -9
- data/config/locales/uk.ckeditor.yml +0 -9
- data/config/locales/zh-CN.ckeditor.yml +0 -9
- data/config/locales/zh-TW.ckeditor.yml +0 -9
- data/lib/ckeditor/engine.rb +0 -46
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +0 -183
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +0 -206
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +0 -85
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +0 -32
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +0 -157
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +0 -202
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +0 -169
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +0 -51
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +0 -122
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +0 -66
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +0 -27
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +0 -105
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +0 -59
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +0 -150
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +0 -20
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +0 -146
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +0 -44
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +0 -49
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +0 -182
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +0 -43
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +0 -226
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +0 -41
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +0 -60
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +0 -348
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +0 -155
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +0 -438
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +0 -271
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +0 -110
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +0 -64
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +0 -123
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +0 -33
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +0 -85
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +0 -213
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +0 -49
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +0 -165
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +0 -8
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +0 -97
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +0 -252
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +0 -189
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +0 -74
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +0 -118
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +0 -98
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +0 -952
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +0 -2087
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +0 -9109
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +0 -137
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +0 -73
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +0 -161
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +0 -128
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +0 -785
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +0 -360
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +0 -767
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +0 -55
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +0 -825
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +0 -103
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +0 -17
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +0 -75
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +0 -152
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +0 -54
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +0 -157
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +0 -110
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +0 -200
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +0 -28
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +0 -60
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +0 -152
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +0 -89
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +0 -114
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +0 -784
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +0 -72
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +0 -247
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +0 -61
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +0 -64
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +0 -234
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +0 -154
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +0 -61
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +0 -51
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +0 -394
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd5fc7c3e382765593ac119363137925683ead9e
|
4
|
+
data.tar.gz: 7dfbb5ef069835cbce6c6dc1c7d499c2b118cd5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8359fb3faa349be8544cd5c46a50caf956c73195f73b12c01774a3fa945292193086925de5ee4d96afe439fd6c950396a5f46316c570baf87d7724bcddf83eb
|
7
|
+
data.tar.gz: 97ef2bd911894eeebf88b36d363e5808edffcab219fa55ae056216a75142b3c678a25b35613c419dffc6b5e3c24c03d3d4f3ced07c589bf48145d725b1a961ee
|
data/Gemfile
CHANGED
@@ -1,42 +1,35 @@
|
|
1
|
-
source
|
1
|
+
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem
|
6
|
-
|
7
|
-
platforms :mri_18 do
|
8
|
-
group :test do
|
9
|
-
gem 'ruby-debug'
|
10
|
-
gem 'SystemTimer'
|
11
|
-
end
|
12
|
-
end
|
5
|
+
gem 'rails', '4.2.10'
|
13
6
|
|
14
7
|
platforms :ruby do
|
15
|
-
gem
|
8
|
+
gem 'sqlite3'
|
9
|
+
gem 'sass'
|
16
10
|
|
17
11
|
group :development do
|
18
|
-
gem
|
12
|
+
gem 'unicorn', '~> 4.0.1'
|
19
13
|
end
|
20
14
|
|
21
15
|
group :development, :test do
|
22
|
-
gem 'jquery-rails'
|
23
|
-
gem
|
24
|
-
gem
|
16
|
+
gem 'jquery-rails', '~> 4.0.4'
|
17
|
+
gem 'capybara', '>= 0.4.0'
|
18
|
+
gem 'mynyml-redgreen', '~> 0.7.1', require: 'redgreen'
|
25
19
|
end
|
26
20
|
|
27
21
|
group :active_record do
|
28
22
|
gem 'paperclip'
|
29
|
-
gem
|
30
|
-
gem
|
31
|
-
gem
|
32
|
-
gem
|
33
|
-
gem
|
23
|
+
gem 'carrierwave'
|
24
|
+
gem 'dragonfly'
|
25
|
+
gem 'mini_magick'
|
26
|
+
gem 'refile', require: 'refile/rails'
|
27
|
+
gem 'refile-mini_magick'
|
34
28
|
end
|
35
29
|
|
36
30
|
group :mongoid do
|
37
31
|
gem 'mongoid', '~> 5.0.0'
|
38
|
-
gem
|
39
|
-
gem 'mongoid
|
40
|
-
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
|
32
|
+
gem 'mongoid-paperclip', require: 'mongoid_paperclip'
|
33
|
+
gem 'carrierwave-mongoid', require: 'carrierwave/mongoid'
|
41
34
|
end
|
42
35
|
end
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,326 +1,3 @@
|
|
1
|
-
#
|
1
|
+
# glebtv-ckeditor
|
2
2
|
|
3
|
-
|
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.
|
7
|
-
[ckeditor.com](http://ckeditor.com/)
|
8
|
-
|
9
|
-
## Features
|
10
|
-
|
11
|
-
* Ckeditor version 4.5.6 (9 Dec 2015)
|
12
|
-
* Rails 4 integration
|
13
|
-
* Files browser
|
14
|
-
* HTML5 file uploader
|
15
|
-
* Hooks for formtastic and simple_form forms generators
|
16
|
-
* Integrated with authorization framework CanCan and Pundit
|
17
|
-
|
18
|
-
## Installation
|
19
|
-
|
20
|
-
For basic usage just include the ckeditor gem:
|
21
|
-
|
22
|
-
```
|
23
|
-
gem 'ckeditor'
|
24
|
-
```
|
25
|
-
|
26
|
-
or if you'd like to use the latest version from Github:
|
27
|
-
|
28
|
-
```
|
29
|
-
gem 'ckeditor', github: 'galetahub/ckeditor'
|
30
|
-
```
|
31
|
-
|
32
|
-
For file upload support, you must generate the necessary file storage models.
|
33
|
-
The currently supported backends are:
|
34
|
-
|
35
|
-
* ActiveRecord (paperclip, carrierwave, dragonfly)
|
36
|
-
* Mongoid (paperclip, carrierwave, dragonfly)
|
37
|
-
|
38
|
-
### How to generate models to store uploaded files
|
39
|
-
|
40
|
-
#### ActiveRecord + paperclip
|
41
|
-
|
42
|
-
To use the active_record orm with paperclip (i.e. the default settings):
|
43
|
-
|
44
|
-
```
|
45
|
-
gem 'paperclip'
|
46
|
-
|
47
|
-
rails generate ckeditor:install --orm=active_record --backend=paperclip
|
48
|
-
```
|
49
|
-
|
50
|
-
#### ActiveRecord + carrierwave
|
51
|
-
|
52
|
-
```
|
53
|
-
gem 'carrierwave'
|
54
|
-
gem 'mini_magick'
|
55
|
-
|
56
|
-
rails generate ckeditor:install --orm=active_record --backend=carrierwave
|
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
|
-
|
78
|
-
#### Mongoid + paperclip
|
79
|
-
|
80
|
-
```
|
81
|
-
gem 'mongoid-paperclip', :require => 'mongoid_paperclip'
|
82
|
-
|
83
|
-
rails generate ckeditor:install --orm=mongoid --backend=paperclip
|
84
|
-
```
|
85
|
-
|
86
|
-
#### Mongoid + carrierwave
|
87
|
-
|
88
|
-
```
|
89
|
-
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
|
90
|
-
gem 'mini_magick'
|
91
|
-
|
92
|
-
rails generate ckeditor:install --orm=mongoid --backend=carrierwave
|
93
|
-
```
|
94
|
-
|
95
|
-
#### Load generated models
|
96
|
-
|
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):
|
99
|
-
|
100
|
-
```ruby
|
101
|
-
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
|
102
|
-
```
|
103
|
-
|
104
|
-
Mount the Ckeditor::Engine in your routes (config/routes.rb):
|
105
|
-
|
106
|
-
```ruby
|
107
|
-
mount Ckeditor::Engine => '/ckeditor'
|
108
|
-
```
|
109
|
-
|
110
|
-
## Usage
|
111
|
-
|
112
|
-
### Load editor from gem vendor
|
113
|
-
|
114
|
-
Include ckeditor javascripts in your `app/assets/javascripts/application.js`:
|
115
|
-
|
116
|
-
```
|
117
|
-
//= require ckeditor/init
|
118
|
-
```
|
119
|
-
|
120
|
-
### Load editor via CKEditor CDN
|
121
|
-
|
122
|
-
Setup editor version to load (more info here http://cdn.ckeditor.com/)
|
123
|
-
|
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
|
-
```
|
132
|
-
|
133
|
-
In view template include ckeditor CDN:
|
134
|
-
|
135
|
-
```slim
|
136
|
-
= javascript_include_tag Ckeditor.cdn_url
|
137
|
-
```
|
138
|
-
|
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'}
|
146
|
-
```
|
147
|
-
|
148
|
-
### Customize ckeditor
|
149
|
-
|
150
|
-
All ckeditor options can be found [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
|
151
|
-
|
152
|
-
In order to configure the ckeditor default options, create the following files:
|
153
|
-
|
154
|
-
```
|
155
|
-
app/assets/javascripts/ckeditor/config.js
|
156
|
-
|
157
|
-
app/assets/javascripts/ckeditor/contents.css
|
158
|
-
```
|
159
|
-
|
160
|
-
#### Custom toolbars example
|
161
|
-
|
162
|
-
Adding a custom toolbar:
|
163
|
-
|
164
|
-
```javascript
|
165
|
-
# in app/assets/javascripts/ckeditor/config.js
|
166
|
-
|
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
|
-
}
|
177
|
-
```
|
178
|
-
|
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`:
|
184
|
-
|
185
|
-
```ruby
|
186
|
-
Rails.application.config.assets.precompile += %w( ckeditor/* )
|
187
|
-
```
|
188
|
-
|
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.
|
191
|
-
|
192
|
-
To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
|
193
|
-
|
194
|
-
```ruby
|
195
|
-
# in config/initializers/ckeditor.rb
|
196
|
-
|
197
|
-
Ckeditor.setup do |config|
|
198
|
-
config.assets_languages = ['en', 'fr']
|
199
|
-
config.assets_plugins = ['image', 'smiley']
|
200
|
-
end
|
201
|
-
```
|
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
|
-
|
221
|
-
### AJAX
|
222
|
-
|
223
|
-
jQuery sample:
|
224
|
-
|
225
|
-
```html
|
226
|
-
<script type='text/javascript' charset='UTF-8'>
|
227
|
-
$(document).ready(function(){
|
228
|
-
$('form[data-remote]').bind('ajax:before', function(){
|
229
|
-
for (instance in CKEDITOR.instances){
|
230
|
-
CKEDITOR.instances[instance].updateElement();
|
231
|
-
}
|
232
|
-
});
|
233
|
-
});
|
234
|
-
</script>
|
235
|
-
```
|
236
|
-
|
237
|
-
### Formtastic integration
|
238
|
-
|
239
|
-
```slim
|
240
|
-
= form.input :content, :as => :ckeditor
|
241
|
-
= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => { :height => 400 } }
|
242
|
-
```
|
243
|
-
|
244
|
-
### SimpleForm integration
|
245
|
-
|
246
|
-
```slim
|
247
|
-
= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} }
|
248
|
-
```
|
249
|
-
|
250
|
-
### CanCan integration
|
251
|
-
|
252
|
-
To use cancan with Ckeditor, add this to an initializer:
|
253
|
-
|
254
|
-
```ruby
|
255
|
-
# in config/initializers/ckeditor.rb
|
256
|
-
|
257
|
-
Ckeditor.setup do |config|
|
258
|
-
config.authorize_with :cancan
|
259
|
-
end
|
260
|
-
```
|
261
|
-
|
262
|
-
At this point, all authorization will fail and no one will be able to access the filebrowser pages.
|
263
|
-
To grant access, add this to Ability#initialize:
|
264
|
-
|
265
|
-
```ruby
|
266
|
-
# Always performed
|
267
|
-
can :access, :ckeditor # needed to access Ckeditor filebrowser
|
268
|
-
|
269
|
-
# Performed checks for actions:
|
270
|
-
can [:read, :create, :destroy], Ckeditor::Picture
|
271
|
-
can [:read, :create, :destroy], Ckeditor::AttachmentFile
|
272
|
-
```
|
273
|
-
|
274
|
-
### Pundit integration
|
275
|
-
|
276
|
-
Just like CanCan, you can write this code in your config/initializers/ckeditor.rb file:
|
277
|
-
|
278
|
-
```ruby
|
279
|
-
Ckeditor.setup do |config|
|
280
|
-
config.authorize_with :pundit
|
281
|
-
end
|
282
|
-
```
|
283
|
-
|
284
|
-
Then, generate the policy files for model **Picture** and **AttachmentFile**
|
285
|
-
|
286
|
-
```
|
287
|
-
$ rails g ckeditor:pundit_policy
|
288
|
-
```
|
289
|
-
By this command, you will got two files:
|
290
|
-
> app/policies/ckeditor/picture_policy.rb
|
291
|
-
app/policies/ckeditor/attachment_file_policy.rb
|
292
|
-
|
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.
|
294
|
-
|
295
|
-
You can customize these two policy files as you like.
|
296
|
-
|
297
|
-
## I18n
|
298
|
-
|
299
|
-
```yml
|
300
|
-
en:
|
301
|
-
ckeditor:
|
302
|
-
page_title: 'CKEditor Files Manager'
|
303
|
-
confirm_delete: 'Delete file?'
|
304
|
-
buttons:
|
305
|
-
cancel: 'Cancel'
|
306
|
-
upload: 'Upload'
|
307
|
-
delete: 'Delete'
|
308
|
-
next: 'Next'
|
309
|
-
```
|
310
|
-
|
311
|
-
## Tests
|
312
|
-
|
313
|
-
```bash
|
314
|
-
$> rake test CKEDITOR_BACKEND=paperclip
|
315
|
-
$> rake test CKEDITOR_BACKEND=carrierwave
|
316
|
-
$> rake test CKEDITOR_BACKEND=refile
|
317
|
-
$> rake test CKEDITOR_BACKEND=dragonfly
|
318
|
-
$> rake test CKEDITOR_ORM=mongoid
|
319
|
-
|
320
|
-
$> rake test:controllers
|
321
|
-
$> rake test:generators
|
322
|
-
$> rake test:integration
|
323
|
-
$> rake test:models
|
324
|
-
```
|
325
|
-
|
326
|
-
This project rocks and uses the MIT-LICENSE.
|
3
|
+
This is a fork https://github.com/galetahub/ckeditor preconfigured for our needs.
|
data/Rakefile
CHANGED
data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.jpg
RENAMED
File without changes
|
data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_add.png
RENAMED
File without changes
|
data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_del.png
RENAMED
File without changes
|
data/app/assets/{javascripts/ckeditor/filebrowser/images → images/ckeditor/filebrowser}/gal_more.gif
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|