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.
Files changed (443) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +38 -0
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +124 -84
  5. data/Rakefile +1 -25
  6. data/app/assets/javascripts/ckeditor/application.js +0 -1
  7. data/app/assets/javascripts/ckeditor/config.js.erb +5 -59
  8. data/app/assets/javascripts/ckeditor/config_orig.js +58 -0
  9. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.jpg +0 -0
  10. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_add.png +0 -0
  11. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_del.png +0 -0
  12. data/app/assets/javascripts/ckeditor/filebrowser/images/gal_more.gif +0 -0
  13. data/app/assets/javascripts/ckeditor/filebrowser/images/preloader.gif +0 -0
  14. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/avi.gif +0 -0
  15. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/ckfnothumb.gif +0 -0
  16. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/doc.gif +0 -0
  17. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/docx.gif +0 -0
  18. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/exe.gif +0 -0
  19. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/gz.gif +0 -0
  20. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/htm.gif +0 -0
  21. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/jpg.gif +0 -0
  22. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mp3.gif +0 -0
  23. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/mpg.gif +0 -0
  24. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/pdf.gif +0 -0
  25. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/psd.gif +0 -0
  26. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/rar.gif +0 -0
  27. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/swf.gif +0 -0
  28. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/tar.gif +0 -0
  29. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/txt.gif +0 -0
  30. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/unknown.gif +0 -0
  31. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/wmv.gif +0 -0
  32. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xls.gif +0 -0
  33. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/xlsx.gif +0 -0
  34. data/app/assets/javascripts/ckeditor/filebrowser/images/thumbs/zip.gif +0 -0
  35. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/application.js.erb +58 -56
  36. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/fileuploader.js +0 -0
  37. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +0 -0
  38. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.tmpl.min.js +0 -0
  39. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/rails.js +0 -0
  40. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +12 -6
  41. data/app/assets/javascripts/ckeditor/init.js.erb +6 -1
  42. data/app/assets/stylesheets/ckcontent.css +0 -0
  43. data/app/assets/stylesheets/ckeditor/application.css +0 -0
  44. data/app/controllers/ckeditor/application_controller.rb +6 -17
  45. data/app/controllers/ckeditor/attachment_files_controller.rb +10 -3
  46. data/app/controllers/ckeditor/pictures_controller.rb +9 -2
  47. data/app/helpers/ckeditor/application_helper.rb +0 -0
  48. data/app/views/ckeditor/attachment_files/index.html.erb +3 -3
  49. data/app/views/ckeditor/pictures/index.html.erb +3 -3
  50. data/app/views/ckeditor/shared/_asset.html.erb +0 -0
  51. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +0 -0
  52. data/app/views/layouts/ckeditor/application.html.erb +3 -2
  53. data/app/views/rails_admin/main/_form_ck_editor.html.haml +1 -1
  54. data/app/views/rails_admin/main/_form_ck_editorml.html.haml +1 -1
  55. data/config/locales/bg.ckeditor.yml +9 -0
  56. data/config/locales/cs.ckeditor.yml +0 -0
  57. data/config/locales/de.ckeditor.yml +0 -0
  58. data/config/locales/el-GR.cdkeditor.yml +0 -0
  59. data/config/locales/en.ckeditor.yml +0 -0
  60. data/config/locales/es.ckeditor.yml +0 -0
  61. data/config/locales/fr.ckeditor.yml +0 -0
  62. data/config/locales/hu.ckeditor.yml +0 -0
  63. data/config/locales/it.ckeditor.yml +0 -0
  64. data/config/locales/ja.ckeditor.yml +9 -0
  65. data/config/locales/nb.ckeditor.yml +9 -0
  66. data/config/locales/nl.ckeditor.yml +0 -0
  67. data/config/locales/pl.ckeditor.yml +0 -0
  68. data/config/locales/pt-BR.ckeditor.yml +0 -0
  69. data/config/locales/pt-PT.ckeditor.yml +0 -0
  70. data/config/locales/ru.ckeditor.yml +0 -0
  71. data/config/locales/sv-SE.ckeditor.yml +0 -0
  72. data/config/locales/tr.ckeditor.yml +9 -0
  73. data/config/locales/uk.ckeditor.yml +0 -0
  74. data/config/locales/zh-CN.ckeditor.yml +1 -1
  75. data/config/locales/zh-TW.ckeditor.yml +9 -0
  76. data/config/routes.rb +0 -0
  77. data/lib/ckeditor.rb +39 -5
  78. data/lib/ckeditor/asset_response.rb +59 -0
  79. data/lib/ckeditor/backend/carrierwave.rb +1 -8
  80. data/lib/ckeditor/backend/dragonfly.rb +8 -6
  81. data/lib/ckeditor/backend/paperclip.rb +7 -11
  82. data/lib/ckeditor/backend/refile.rb +37 -0
  83. data/lib/ckeditor/engine.rb +4 -0
  84. data/lib/ckeditor/helpers/controllers.rb +0 -0
  85. data/lib/ckeditor/helpers/form_builder.rb +0 -0
  86. data/lib/ckeditor/helpers/form_helper.rb +0 -0
  87. data/lib/ckeditor/helpers/view_helper.rb +0 -0
  88. data/lib/ckeditor/hooks/cancan.rb +4 -1
  89. data/lib/ckeditor/hooks/formtastic.rb +0 -0
  90. data/lib/ckeditor/hooks/pundit.rb +0 -0
  91. data/lib/ckeditor/hooks/simple_form.rb +1 -1
  92. data/lib/ckeditor/http.rb +1 -3
  93. data/lib/ckeditor/orm/active_record.rb +0 -0
  94. data/lib/ckeditor/orm/base.rb +0 -0
  95. data/lib/ckeditor/orm/mongoid.rb +0 -0
  96. data/lib/ckeditor/paginatable.rb +0 -0
  97. data/lib/ckeditor/text_area.rb +2 -1
  98. data/lib/ckeditor/utils.rb +26 -23
  99. data/lib/ckeditor/utils/content_type_detector.rb +41 -0
  100. data/lib/ckeditor/utils/javascript_code.rb +10 -0
  101. data/lib/ckeditor/version.rb +4 -2
  102. data/lib/generators/ckeditor/install_generator.rb +1 -1
  103. data/lib/generators/ckeditor/pundit_policy_generator.rb +0 -0
  104. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/asset.rb +0 -0
  105. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/attachment_file.rb +0 -0
  106. data/lib/generators/ckeditor/templates/active_record/carrierwave/ckeditor/picture.rb +0 -0
  107. data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +0 -0
  108. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/asset.rb +1 -1
  109. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/attachment_file.rb +1 -1
  110. data/lib/generators/ckeditor/templates/active_record/dragonfly/ckeditor/picture.rb +0 -0
  111. data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +0 -0
  112. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/asset.rb +0 -0
  113. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/attachment_file.rb +3 -5
  114. data/lib/generators/ckeditor/templates/active_record/paperclip/ckeditor/picture.rb +3 -5
  115. data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +7 -7
  116. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/asset.rb +4 -0
  117. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/attachment_file.rb +7 -0
  118. data/lib/generators/ckeditor/templates/active_record/refile/ckeditor/picture.rb +11 -0
  119. data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +28 -0
  120. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_attachment_file_uploader.rb +2 -0
  121. data/lib/generators/ckeditor/templates/base/carrierwave/uploaders/ckeditor_picture_uploader.rb +0 -0
  122. data/lib/generators/ckeditor/templates/base/dragonfly/initializer.rb +13 -19
  123. data/lib/generators/ckeditor/templates/ckeditor.rb +23 -0
  124. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/asset.rb +0 -0
  125. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/attachment_file.rb +0 -0
  126. data/lib/generators/ckeditor/templates/mongoid/carrierwave/ckeditor/picture.rb +0 -0
  127. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/asset.rb +0 -0
  128. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/attachment_file.rb +3 -6
  129. data/lib/generators/ckeditor/templates/mongoid/paperclip/ckeditor/picture.rb +3 -5
  130. data/lib/generators/ckeditor/templates/pundit_policy/attachment_file_policy.rb +3 -3
  131. data/lib/generators/ckeditor/templates/pundit_policy/picture_policy.rb +3 -3
  132. data/lib/glebtv-ckeditor.rb +0 -0
  133. data/lib/tasks/ckeditor.rake +26 -0
  134. data/test/controllers/attachment_files_controller_test.rb +2 -2
  135. data/test/controllers/pictures_controller_test.rb +3 -4
  136. data/test/dummy/Rakefile +0 -0
  137. data/test/dummy/app/assets/javascripts/application.js +0 -1
  138. data/test/dummy/app/assets/stylesheets/application.css +0 -0
  139. data/test/dummy/app/assets/stylesheets/scaffold.css +0 -0
  140. data/test/dummy/app/controllers/application_controller.rb +0 -1
  141. data/test/dummy/app/controllers/posts_controller.rb +0 -0
  142. data/test/dummy/app/helpers/application_helper.rb +0 -0
  143. data/test/dummy/app/helpers/posts_helper.rb +0 -0
  144. data/test/dummy/app/models/post.rb +0 -0
  145. data/test/dummy/app/views/layouts/application.html.erb +2 -2
  146. data/test/dummy/app/views/posts/_form.html.erb +0 -0
  147. data/test/dummy/app/views/posts/edit.html.erb +0 -0
  148. data/test/dummy/app/views/posts/index.html.erb +0 -0
  149. data/test/dummy/app/views/posts/new.html.erb +0 -0
  150. data/test/dummy/app/views/posts/show.html.erb +0 -0
  151. data/test/dummy/config.ru +0 -0
  152. data/test/dummy/config/application.rb +15 -15
  153. data/test/dummy/config/boot.rb +0 -0
  154. data/test/dummy/config/database.yml +0 -0
  155. data/test/dummy/config/environment.rb +0 -0
  156. data/test/dummy/config/environments/development.rb +0 -0
  157. data/test/dummy/config/environments/production.rb +0 -0
  158. data/test/dummy/config/environments/test.rb +7 -5
  159. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
  160. data/test/dummy/config/initializers/ckeditor.rb +0 -0
  161. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  162. data/test/dummy/config/initializers/inflections.rb +0 -0
  163. data/test/dummy/config/initializers/mime_types.rb +0 -0
  164. data/test/dummy/config/initializers/session_store.rb +0 -0
  165. data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
  166. data/test/dummy/config/locales/en.yml +0 -0
  167. data/test/dummy/config/mongoid.yml +135 -1
  168. data/test/dummy/config/routes.rb +3 -3
  169. data/test/dummy/config/secrets.yml +8 -0
  170. data/test/dummy/db/migrate/20110623120047_create_posts.rb +1 -1
  171. data/test/dummy/public/404.html +0 -0
  172. data/test/dummy/public/422.html +0 -0
  173. data/test/dummy/public/500.html +0 -0
  174. data/test/dummy/public/favicon.ico +0 -0
  175. data/test/dummy/script/rails +0 -0
  176. data/test/dummy/test/fixtures/files/rails.png +0 -0
  177. data/test/dummy/test/fixtures/files/rails.tar.gz +0 -0
  178. data/test/functional/posts_controller_test.rb +6 -6
  179. data/test/generators/install_generator_test.rb +14 -0
  180. data/test/integration/navigation_test.rb +0 -0
  181. data/test/models/attachment_file_test.rb +2 -2
  182. data/test/{ckeditor_test.rb → models/ckeditor_test.rb} +35 -0
  183. data/test/models/picture_test.rb +6 -1
  184. data/test/models/utils_test.rb +6 -6
  185. data/test/orm/active_record.rb +0 -0
  186. data/test/orm/mongoid.rb +0 -0
  187. data/test/support/helpers.rb +0 -0
  188. data/test/support/integration_case.rb +0 -0
  189. data/test/support/raw_post.rb +0 -0
  190. data/test/support/routes.txt +0 -0
  191. data/test/test_helper.rb +3 -5
  192. data/vendor/assets/javascripts/ckeditor/LICENSE.md +159 -3
  193. data/vendor/assets/javascripts/ckeditor/README.md +39 -0
  194. data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +7 -7
  195. data/vendor/assets/javascripts/ckeditor/build-config.js +4 -3
  196. data/vendor/assets/javascripts/ckeditor/ckeditor.js +1028 -964
  197. data/vendor/assets/javascripts/ckeditor/config.js +1 -1
  198. data/vendor/assets/javascripts/ckeditor/lang/en.js +3 -3
  199. data/vendor/assets/javascripts/ckeditor/lang/ru.js +3 -3
  200. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +5 -5
  201. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +4 -4
  202. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +3 -3
  203. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -4
  204. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  205. data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  206. data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +9 -8
  207. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
  208. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autocomplete.png +0 -0
  209. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/autoformat.png +0 -0
  210. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/commentselectedrange.png +0 -0
  211. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/searchcode.png +0 -0
  212. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/icons/uncommentselectedrange.png +0 -0
  213. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.min.js +1 -1
  214. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
  215. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
  216. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
  217. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcode.min.js +0 -0
  218. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.bbcodemixed.min.js +0 -0
  219. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
  220. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
  221. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
  222. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en.js +0 -0
  223. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ru.js +0 -0
  224. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +49 -29
  225. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-day.css +2 -0
  226. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/3024-night.css +2 -0
  227. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance-mobile.css +0 -0
  228. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ambiance.css +7 -8
  229. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-dark.css +2 -0
  230. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/base16-light.css +2 -0
  231. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/blackboard.css +2 -0
  232. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/cobalt.css +2 -0
  233. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/colorforth.css +33 -0
  234. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/eclipse.css +0 -0
  235. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/elegant.css +0 -0
  236. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/erlang-dark.css +3 -1
  237. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/lesser-dark.css +4 -2
  238. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/liquibyte.css +95 -0
  239. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mbo.css +2 -0
  240. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/mdn-like.css +3 -1
  241. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/midnight.css +2 -0
  242. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/monokai.css +5 -1
  243. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neat.css +0 -0
  244. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/neo.css +0 -0
  245. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/night.css +2 -0
  246. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-dark.css +2 -0
  247. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/paraiso-light.css +2 -0
  248. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +3 -0
  249. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/rubyblue.css +2 -0
  250. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +9 -9
  251. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/the-matrix.css +2 -0
  252. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-bright.css +35 -0
  253. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/tomorrow-night-eighties.css +2 -0
  254. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/ttcn.css +65 -0
  255. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/twilight.css +2 -0
  256. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/vibrant-ink.css +2 -0
  257. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-dark.css +2 -0
  258. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/xq-light.css +0 -0
  259. data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/zenburn.css +37 -0
  260. data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +10 -10
  261. data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  262. data/vendor/assets/javascripts/ckeditor/plugins/div/dialogs/div.js +8 -8
  263. data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +16 -16
  264. data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +14 -14
  265. data/vendor/assets/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  266. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +2 -2
  267. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +4 -3
  268. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +4 -4
  269. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +4 -4
  270. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +6 -5
  271. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +15 -15
  272. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +3 -3
  273. data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +6 -5
  274. data/vendor/assets/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  275. data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
  276. data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
  277. data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +3 -3
  278. data/vendor/assets/javascripts/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  279. data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +29 -34
  280. data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +41 -40
  281. data/vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png +0 -0
  282. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +22 -0
  283. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +2 -0
  284. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +3 -0
  285. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -0
  286. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +81 -0
  287. data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +30 -0
  288. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +2 -2
  289. data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +20 -20
  290. data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
  291. data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  292. data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -7
  293. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/hidpi/loremipsum.png +0 -0
  294. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/icons/loremipsum.png +0 -0
  295. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/en.js +8 -0
  296. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/lang/ru.js +8 -0
  297. data/vendor/assets/javascripts/ckeditor/plugins/loremipsum/plugin.js +131 -0
  298. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  299. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  300. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  301. data/vendor/assets/javascripts/ckeditor/plugins/magicline/images/icon.png +0 -0
  302. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +7 -0
  303. data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +7 -0
  304. data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +923 -0
  305. data/vendor/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  306. data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +29 -28
  307. data/vendor/assets/javascripts/ckeditor/plugins/preview/preview.html +0 -0
  308. data/vendor/assets/javascripts/ckeditor/plugins/scayt/CHANGELOG.md +20 -0
  309. data/vendor/assets/javascripts/ckeditor/plugins/scayt/LICENSE.md +28 -28
  310. data/vendor/assets/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  311. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -17
  312. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
  313. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  314. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  315. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  316. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  317. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  318. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  319. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  320. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  321. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  322. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  323. data/vendor/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  324. data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +8 -7
  325. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  326. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
  327. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  328. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
  329. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  330. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
  331. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  332. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
  333. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  334. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
  335. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  336. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
  337. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  338. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
  339. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
  340. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  341. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/envelope.png +0 -0
  342. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  343. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/heart.png +0 -0
  344. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  345. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/kiss.png +0 -0
  346. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  347. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
  348. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  349. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
  350. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  351. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
  352. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  353. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
  354. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  355. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
  356. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  357. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
  358. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  359. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
  360. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  361. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
  362. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
  363. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
  364. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  365. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  366. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
  367. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  368. data/vendor/assets/javascripts/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
  369. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +1 -1
  370. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
  371. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +10 -10
  372. data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +9 -3
  373. data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +17 -17
  374. data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +12 -12
  375. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
  376. data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +7 -7
  377. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +4 -3
  378. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  379. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  380. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  381. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +1 -1
  382. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +4 -2
  383. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +4 -2
  384. data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +286 -145
  385. data/vendor/assets/javascripts/ckeditor/plugins/wsc/LICENSE.md +0 -0
  386. data/vendor/assets/javascripts/ckeditor/plugins/wsc/README.md +0 -0
  387. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
  388. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  389. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
  390. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +88 -70
  391. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc_ie.js +7 -7
  392. data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
  393. data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -1
  394. data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +388 -388
  395. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +5 -0
  396. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +5 -0
  397. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +5 -0
  398. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +5 -0
  399. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  400. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +5 -0
  401. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +5 -0
  402. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +5 -0
  403. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +5 -0
  404. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +5 -0
  405. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +5 -0
  406. data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  407. data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
  408. data/vendor/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  409. data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  410. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  411. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  412. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  413. data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  414. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
  415. data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
  416. data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
  417. data/vendor/assets/javascripts/ckeditor/skins/moono/images/spinner.gif +0 -0
  418. data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +49 -0
  419. data/vendor/assets/javascripts/ckeditor/styles.js +1 -1
  420. metadata +105 -130
  421. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.min.js +0 -4
  422. data/app/assets/javascripts/ckeditor/override.js.erb +0 -21
  423. data/test/dummy/config/initializers/secret_token.rb +0 -7
  424. data/test/support/controller_hooks.rb +0 -27
  425. data/vendor/assets/javascripts/ckeditor/plugins/ipsum/icon.png +0 -0
  426. data/vendor/assets/javascripts/ckeditor/plugins/ipsum/plugin.js +0 -63
  427. data/vendor/assets/javascripts/ckeditor/plugins/map/example_usage.js +0 -30
  428. data/vendor/assets/javascripts/ckeditor/plugins/map/map.gif +0 -0
  429. data/vendor/assets/javascripts/ckeditor/plugins/map/plugin.js +0 -187
  430. data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
  431. data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
  432. data/vendor/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +0 -64
  433. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +0 -771
  434. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +0 -812
  435. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +0 -844
  436. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +0 -825
  437. data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +0 -816
  438. data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css.scss +0 -2136
  439. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +0 -2145
  440. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +0 -2194
  441. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +0 -2362
  442. data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +0 -2206
  443. 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: 024992675102131c25b02ba1f7c3227401ca064d
4
- data.tar.gz: cd770c9149038aa403771c1d38b2101ab1caf61b
3
+ metadata.gz: 967cf72a5f9af7fb06496ce628df448c7b51ca19
4
+ data.tar.gz: 451401d91a449eda8aa22aa54e6025fabd7f10e4
5
5
  SHA512:
6
- metadata.gz: a1ed5b2873da3958def6de3abbbc2f2a0d68f8dd1f4a7452384cf44fcd61cd992adb47ba3c15c0f405d496d2005419db01c0726bd526e292692740436373df69
7
- data.tar.gz: 85a2a2f11e82f8b26a71db9d91dd410784b6adabed586daf825e0d77c80d0afc4e11475b06acef032c372d81686fc20d17d0755f733253a817abd00f39edd82f
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
@@ -1,4 +1,4 @@
1
- Copyright 2011 AIMBULANCE
1
+ Copyright 2011-2015 Fodojo. http://www.fodojo.com/
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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
- CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It's a WYSIWYG editor that brings common word processor features directly to your web pages. Enhance your website experience with our community maintained editor.
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.3.2 (full)
11
+ * Ckeditor version 4.5.6 (9 Dec 2015)
16
12
  * Rails 4 integration
17
13
  * Files browser
18
- * HTML5 files uploader
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 'glebtv-ckeditor'
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 files uploading support you need generage models for file storage.
32
- Currently supported next backends:
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 for store uploading files
38
+ ### How to generate models to store uploaded files
38
39
 
39
40
  #### ActiveRecord + paperclip
40
41
 
41
- For active_record orm is used paperclip gem (it's by default).
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 into app/models/ckeditor folder.
78
- Autoload ckeditor models folder (application.rb):
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 engine in your routes (config/routes.rb):
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
- Include ckeditor javascripts rails 3.2 (application.js):
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
- Form helpers:
120
+ ### Load editor via CKEditor CDN
99
121
 
100
- ```erb
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
- All ckeditor options [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
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 order to configure the ckeditor default options, create files:
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
- app/assets/javascripts/ckeditor/contents.css
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
- ### Usage with Rails 4 assets
148
+ ### Customize ckeditor
123
149
 
124
- In order to use rails 4 assets with digest in production environment you need some preparing.
150
+ All ckeditor options can be found [here](http://docs.ckeditor.com/#!/api/CKEDITOR.config)
125
151
 
126
- First, you need to include in `application.js` **before** `ckeditor/init`
152
+ In order to configure the ckeditor default options, create the following files:
127
153
 
128
154
  ```
129
- //= require ckeditor/override
155
+ app/assets/javascripts/ckeditor/config.js
156
+
157
+ app/assets/javascripts/ckeditor/contents.css
130
158
  ```
131
159
 
132
- It forces ckeditor core to respect digested assets.
160
+ #### Custom toolbars example
133
161
 
134
- Next you need to check, that some non-core plugins and skins don't use core ckeditor functions
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
- ```ruby
138
- namespace :ckeditor do
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
- # auto run ckeditor:create_nondigest_assets after assets:precompile
151
- Rake::Task['assets:precompile'].enhance do
152
- Rake::Task['ckeditor:create_nondigest_assets'].invoke
153
- end
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
- You can include this rake task in a capistrano task (if you are deploying via capistrano):
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
- desc 'copy ckeditor nondigest assets'
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
- Periodically check your error monitoring tool, if you see some part of ckeditor try to load
168
- unexisting non-digest asset - if so just add it in the ckeditor rake task.
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
- ```erb
202
- <%= form.input :content, :as => :ckeditor %>
203
- <%= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => { :height => 400 } } %>
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
- ```erb
209
- <%= form.input :content, :as => :ckeditor, :input_html => { :ckeditor => {:toolbar => 'Full'} } %>
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
- And then, generate the policy files for model **Picture** and **AttachmentFile**
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 action *index* and *create*), and only the owner of the asset can **destroy** the resource.
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 simply customize these two policy files as you like.
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
@@ -1,4 +1,3 @@
1
- //= require ckeditor/filebrowser/javascripts/jquery.min.js
2
1
  //= require ckeditor/filebrowser/javascripts/jquery.tmpl.min.js
3
2
  //= require ckeditor/filebrowser/javascripts/fileuploader.js
4
3
  //= require ckeditor/filebrowser/javascripts/jquery.endless-scroll.js