ouvrages-tinymce-rails 3.4.6 → 3.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) hide show
  1. data/README.md +52 -16
  2. data/Rakefile +11 -20
  3. data/app/assets/javascripts/tinymce-jquery.js +3 -0
  4. data/app/assets/javascripts/tinymce.js +2 -0
  5. data/app/assets/javascripts/tinymce/preinit.js.erb +5 -0
  6. data/lib/tasks/assets.rake +7 -0
  7. data/lib/tinymce-rails.rb +1 -2
  8. data/lib/tinymce/rails.rb +12 -0
  9. data/lib/tinymce/rails/configuration.rb +67 -0
  10. data/lib/tinymce/rails/engine.rb +16 -0
  11. data/lib/tinymce/rails/helper.rb +29 -0
  12. data/lib/tinymce/rails/version.rb +6 -0
  13. data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -0
  14. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/langs/en.js +0 -0
  15. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/license.txt +0 -0
  16. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/css/advhr.css +0 -0
  17. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/editor_plugin.js +0 -0
  18. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/editor_plugin_src.js +0 -0
  19. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/js/rule.js +0 -0
  20. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/langs/en_dlg.js +0 -0
  21. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/rule.htm +0 -0
  22. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/css/advimage.css +0 -0
  23. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/editor_plugin.js +0 -0
  24. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/editor_plugin_src.js +0 -0
  25. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/image.htm +0 -0
  26. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/img/sample.gif +0 -0
  27. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/js/image.js +0 -0
  28. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/langs/en_dlg.js +0 -0
  29. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/css/advlink.css +0 -0
  30. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/editor_plugin.js +0 -0
  31. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/editor_plugin_src.js +0 -0
  32. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/js/advlink.js +8 -1
  33. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/langs/en_dlg.js +0 -0
  34. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/link.htm +0 -0
  35. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlist/editor_plugin.js +0 -0
  36. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlist/editor_plugin_src.js +0 -0
  37. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autolink/editor_plugin.js +0 -0
  38. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autolink/editor_plugin_src.js +0 -0
  39. data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +1 -0
  40. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autoresize/editor_plugin_src.js +20 -38
  41. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autosave/editor_plugin.js +0 -0
  42. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autosave/editor_plugin_src.js +0 -0
  43. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autosave/langs/en.js +0 -0
  44. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/bbcode/editor_plugin.js +0 -0
  45. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/bbcode/editor_plugin_src.js +0 -0
  46. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -0
  47. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/contextmenu/editor_plugin_src.js +1 -0
  48. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/directionality/editor_plugin.js +0 -0
  49. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/directionality/editor_plugin_src.js +0 -0
  50. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/editor_plugin.js +0 -0
  51. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/editor_plugin_src.js +0 -0
  52. data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +42 -0
  53. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
  54. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
  55. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  56. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  57. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
  58. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
  59. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
  60. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
  61. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  62. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
  63. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
  64. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
  65. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  66. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
  67. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
  68. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
  69. data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +43 -0
  70. data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +1 -0
  71. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/dialog.htm +0 -0
  72. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/editor_plugin.js +0 -0
  73. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/editor_plugin_src.js +0 -0
  74. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/img/example.gif +0 -0
  75. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/js/dialog.js +0 -0
  76. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/langs/en.js +0 -0
  77. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/langs/en_dlg.js +0 -0
  78. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example_dependency/editor_plugin.js +0 -0
  79. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -0
  80. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/css/fullpage.css +0 -0
  81. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/editor_plugin.js +0 -0
  82. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/editor_plugin_src.js +0 -0
  83. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/fullpage.htm +0 -0
  84. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/js/fullpage.js +0 -0
  85. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/langs/en_dlg.js +0 -0
  86. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullscreen/editor_plugin.js +0 -0
  87. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -0
  88. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullscreen/fullscreen.htm +0 -0
  89. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/iespell/editor_plugin.js +0 -0
  90. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/iespell/editor_plugin_src.js +0 -0
  91. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/editor_plugin.js +0 -0
  92. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -0
  93. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  94. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  95. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  96. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  97. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  98. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  99. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  100. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -0
  101. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/template.htm +0 -0
  102. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/insertdatetime/editor_plugin.js +0 -0
  103. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -0
  104. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/layer/editor_plugin.js +0 -0
  105. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/layer/editor_plugin_src.js +0 -0
  106. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/legacyoutput/editor_plugin.js +0 -0
  107. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -0
  108. data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +1 -0
  109. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/lists/editor_plugin_src.js +221 -48
  110. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/css/media.css +0 -0
  111. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/editor_plugin.js +0 -0
  112. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/editor_plugin_src.js +0 -0
  113. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/js/embed.js +0 -0
  114. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/js/media.js +39 -22
  115. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/langs/en_dlg.js +1 -1
  116. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/media.htm +0 -0
  117. data/vendor/assets/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
  118. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/nonbreaking/editor_plugin.js +0 -0
  119. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -0
  120. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/noneditable/editor_plugin.js +0 -0
  121. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/noneditable/editor_plugin_src.js +0 -0
  122. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/pagebreak/editor_plugin.js +0 -0
  123. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -0
  124. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/editor_plugin.js +0 -0
  125. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/editor_plugin_src.js +0 -0
  126. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/js/pastetext.js +0 -0
  127. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/js/pasteword.js +0 -0
  128. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/langs/en_dlg.js +0 -0
  129. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/pastetext.htm +0 -0
  130. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/pasteword.htm +0 -0
  131. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/editor_plugin.js +0 -0
  132. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/editor_plugin_src.js +0 -0
  133. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/example.html +0 -0
  134. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/jscripts/embed.js +0 -0
  135. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/preview.html +0 -0
  136. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/print/editor_plugin.js +0 -0
  137. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/print/editor_plugin_src.js +0 -0
  138. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/save/editor_plugin.js +0 -0
  139. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/save/editor_plugin_src.js +0 -0
  140. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/css/searchreplace.css +0 -0
  141. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/editor_plugin.js +0 -0
  142. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -0
  143. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/js/searchreplace.js +0 -0
  144. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -0
  145. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/searchreplace.htm +0 -0
  146. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/css/content.css +0 -0
  147. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/editor_plugin.js +0 -0
  148. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -0
  149. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/img/wline.gif +0 -0
  150. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/css/props.css +0 -0
  151. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/editor_plugin.js +0 -0
  152. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/editor_plugin_src.js +0 -0
  153. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/js/props.js +15 -0
  154. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/langs/en_dlg.js +0 -0
  155. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/props.htm +1 -1
  156. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/tabfocus/editor_plugin.js +0 -0
  157. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -0
  158. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/cell.htm +0 -0
  159. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/css/cell.css +0 -0
  160. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/css/row.css +0 -0
  161. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/css/table.css +0 -0
  162. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/editor_plugin.js +1 -1
  163. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/editor_plugin_src.js +108 -46
  164. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/cell.js +0 -0
  165. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/merge_cells.js +0 -0
  166. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/row.js +0 -0
  167. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/table.js +50 -12
  168. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/langs/en_dlg.js +0 -0
  169. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/merge_cells.htm +0 -0
  170. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/row.htm +0 -0
  171. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/table.htm +1 -1
  172. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/blank.htm +0 -0
  173. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/css/template.css +0 -0
  174. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/editor_plugin.js +0 -0
  175. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/editor_plugin_src.js +0 -0
  176. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/js/template.js +0 -0
  177. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/langs/en_dlg.js +0 -0
  178. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/template.htm +0 -0
  179. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/visualchars/editor_plugin.js +0 -0
  180. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/visualchars/editor_plugin_src.js +0 -0
  181. data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -0
  182. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/wordcount/editor_plugin_src.js +14 -6
  183. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/abbr.htm +0 -0
  184. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/acronym.htm +0 -0
  185. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/attributes.htm +0 -0
  186. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/cite.htm +0 -0
  187. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -0
  188. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/css/popup.css +0 -0
  189. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/del.htm +0 -0
  190. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -0
  191. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -0
  192. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/ins.htm +0 -0
  193. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -0
  194. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -0
  195. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -0
  196. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/cite.js +0 -0
  197. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/del.js +0 -0
  198. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -0
  199. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/ins.js +0 -0
  200. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -0
  201. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/about.htm +0 -0
  202. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/anchor.htm +0 -0
  203. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/charmap.htm +5 -1
  204. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/color_picker.htm +0 -0
  205. data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +1 -0
  206. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/editor_template_src.js +7 -3
  207. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/image.htm +0 -0
  208. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  209. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/flash.gif +0 -0
  210. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/icons.gif +0 -0
  211. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/iframe.gif +0 -0
  212. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  213. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/quicktime.gif +0 -0
  214. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/realmedia.gif +0 -0
  215. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/shockwave.gif +0 -0
  216. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/trans.gif +0 -0
  217. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/video.gif +0 -0
  218. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  219. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/about.js +0 -0
  220. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/anchor.js +0 -0
  221. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/charmap.js +11 -3
  222. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/color_picker.js +4 -4
  223. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/image.js +0 -0
  224. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/link.js +0 -0
  225. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/source_editor.js +0 -0
  226. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/langs/en.js +0 -0
  227. data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +1 -0
  228. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/link.htm +0 -0
  229. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/shortcuts.htm +0 -0
  230. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/content.css +0 -0
  231. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/dialog.css +0 -0
  232. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  233. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  234. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  235. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  236. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  237. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  238. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/ui.css +0 -0
  239. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/highcontrast/content.css +0 -0
  240. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -0
  241. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -0
  242. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/content.css +0 -0
  243. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -0
  244. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  245. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  246. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  247. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/ui.css +0 -0
  248. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -0
  249. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -0
  250. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/source_editor.htm +0 -0
  251. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/editor_template.js +0 -0
  252. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/editor_template_src.js +0 -0
  253. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/img/icons.gif +0 -0
  254. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/langs/en.js +0 -0
  255. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/default/content.css +0 -0
  256. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/default/ui.css +0 -0
  257. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/o2k7/content.css +0 -0
  258. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  259. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/o2k7/ui.css +0 -0
  260. data/vendor/assets/javascripts/tinymce/tiny_mce.js +1 -0
  261. data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +1 -0
  262. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/tiny_mce_jquery_src.js +774 -409
  263. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/tiny_mce_popup.js +0 -0
  264. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/tiny_mce_src.js +774 -409
  265. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/editable_selects.js +0 -0
  266. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/form_utils.js +0 -0
  267. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/mctabs.js +0 -0
  268. data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/validate.js +0 -0
  269. metadata +294 -318
  270. data/assets/integration/tinymce-jquery.js +0 -3
  271. data/assets/integration/tinymce.js +0 -2
  272. data/assets/integration/tinymce/preinit.js.erb +0 -5
  273. data/assets/precompiled/tinymce/jquery.tinymce.js +0 -1
  274. data/assets/precompiled/tinymce/langs/fr.js +0 -1
  275. data/assets/precompiled/tinymce/plugins/advhr/langs/fr_dlg.js +0 -1
  276. data/assets/precompiled/tinymce/plugins/advimage/langs/fr_dlg.js +0 -1
  277. data/assets/precompiled/tinymce/plugins/advlink/langs/fr_dlg.js +0 -1
  278. data/assets/precompiled/tinymce/plugins/autoresize/editor_plugin.js +0 -1
  279. data/assets/precompiled/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
  280. data/assets/precompiled/tinymce/plugins/emotions/emotions.htm +0 -41
  281. data/assets/precompiled/tinymce/plugins/emotions/js/emotions.js +0 -22
  282. data/assets/precompiled/tinymce/plugins/emotions/langs/en_dlg.js +0 -1
  283. data/assets/precompiled/tinymce/plugins/emotions/langs/fr_dlg.js +0 -1
  284. data/assets/precompiled/tinymce/plugins/fullpage/langs/fr_dlg.js +0 -1
  285. data/assets/precompiled/tinymce/plugins/lists/editor_plugin.js +0 -1
  286. data/assets/precompiled/tinymce/plugins/media/langs/fr_dlg.js +0 -1
  287. data/assets/precompiled/tinymce/plugins/media/moxieplayer.swf +0 -0
  288. data/assets/precompiled/tinymce/plugins/paste/langs/fr_dlg.js +0 -1
  289. data/assets/precompiled/tinymce/plugins/searchreplace/langs/fr_dlg.js +0 -1
  290. data/assets/precompiled/tinymce/plugins/style/langs/fr_dlg.js +0 -1
  291. data/assets/precompiled/tinymce/plugins/table/langs/fr_dlg.js +0 -1
  292. data/assets/precompiled/tinymce/plugins/template/langs/fr_dlg.js +0 -1
  293. data/assets/precompiled/tinymce/plugins/wordcount/editor_plugin.js +0 -1
  294. data/assets/precompiled/tinymce/plugins/xhtmlxtras/langs/fr_dlg.js +0 -1
  295. data/assets/precompiled/tinymce/themes/advanced/editor_template.js +0 -1
  296. data/assets/precompiled/tinymce/themes/advanced/langs/en_dlg.js +0 -1
  297. data/assets/precompiled/tinymce/themes/advanced/langs/fr.js +0 -1
  298. data/assets/precompiled/tinymce/themes/advanced/langs/fr_dlg.js +0 -1
  299. data/assets/precompiled/tinymce/themes/simple/langs/fr.js +0 -1
  300. data/assets/precompiled/tinymce/tiny_mce.js +0 -1
  301. data/assets/precompiled/tinymce/tiny_mce_jquery.js +0 -1
  302. data/assets/vendor/tinymce/jquery-tinymce.js +0 -1
  303. data/assets/vendor/tinymce/tiny_mce.js +0 -16479
  304. data/assets/vendor/tinymce/tiny_mce_jquery.js +0 -15656
  305. data/lib/tinymce/assets.rake +0 -7
  306. data/lib/tinymce/rails-3.1.0.rake +0 -65
  307. data/lib/tinymce/railtie.rb +0 -27
  308. data/lib/tinymce/version.rb +0 -4
data/README.md CHANGED
@@ -11,35 +11,65 @@ Instructions
11
11
 
12
12
  gem 'tinymce-rails'
13
13
 
14
- Then run `bundle install`.
14
+ Be sure to add to the global group, not the `assets` group. Then run `bundle install`.
15
15
 
16
16
 
17
- **2a. Use TinyMCE with the jQuery extension**
17
+ **2. Create a `config/tinymce.yml` file with your global configuration options:**
18
+
19
+ theme_advanced_toolbar_location: top
20
+ theme_advanced_toolbar_align: left
21
+ theme_advanced_statusbar_location: bottom
22
+ theme_advanced_buttons3_add:
23
+ - tablecontrols
24
+ - fullscreen
25
+ plugins:
26
+ - table
27
+ - fullscreen
28
+
29
+ See the [TinyMCE Documentation](http://www.tinymce.com/wiki.php/Configuration) for a full list of configuration options.
30
+
31
+
32
+ **3. Include the TinyMCE assets**
18
33
 
19
34
  Add to your application.js:
20
35
 
36
+ //= require tinymce
37
+
38
+ or with jQuery integration:
39
+
21
40
  //= require tinymce-jquery
22
41
 
23
- and use TinyMCE in your view:
42
+ The TinyMCE assets can be included on a per-page basis using the `tinymce_assets` helper:
24
43
 
25
- <%= text_area_tag :editor, "", :rows => 40, :cols => 120 %>
44
+ <%= tinymce_assets %>
45
+ #=> <script type="text/javascript" src="/assets/tinymce.js">
26
46
 
27
- <script type="text/javascript">
28
- $(function() {
29
- $('textarea').tinymce({
30
- theme: 'advanced'
31
- });
32
- });
33
- </script>
34
47
 
48
+ **4. Initialize TinyMCE**
35
49
 
36
- **2b. Use TinyMCE without jQuery**
50
+ For each textarea that you want to use with TinyMCE, add the "tinymce" class and ensure it has a unique ID:
37
51
 
38
- Add to your application.js:
52
+ <%= text_area_tag :editor, "", :class => "tinymce", :rows => 40, :cols => 120 %>
39
53
 
40
- //= require tinymce
54
+ Then invoke the `tinymce` helper to initialize TinyMCE:
55
+
56
+ <%= tinymce %>
57
+
58
+ Custom options can be passed to `tinymce` to override the global options specified in `config/tinymce.yml`:
59
+
60
+ <%= tinymce :theme => "simple", :language => "de", :plugins => ["inlinepopups", "paste"] %>
61
+
62
+
63
+ Language Packs
64
+ --------------
41
65
 
42
- Use TinyMCE in your view:
66
+ See the [tinymce-rails-langs](https://github.com/spohlenz/tinymce-rails-langs) gem for additional language packs for TinyMCE. The `tinymce` helper will use the current locale as the language if available, falling back to English if the core language files are missing.
67
+
68
+
69
+ Manual Initialization
70
+ ---------------------
71
+
72
+ Using the `tinymce` helper and global configuration file is entirely optional. The `tinyMCE.init` function can be invoked manually if desired.
43
73
 
44
74
  <%= text_area_tag :editor, "", :rows => 40, :cols => 120 %>
45
75
 
@@ -58,7 +88,13 @@ To use custom plugins or skins, simply add the files to your asset load path so
58
88
 
59
89
  For example, a plugin called `mycustomplugin` could have its main JS file at `app/assets/javascripts/tinymce/plugins/mycustomplugin/editor_plugin.js`.
60
90
 
61
- Any files with a path beginning with `tinymce/` will be automatically precompiled, and the [digestion](https://github.com/spohlenz/digestion) gem is used to ensure that these files never have an asset digest appended to their filenames, even in production mode.
91
+ You should also ensure that your custom paths are added to the asset precompile paths.
92
+
93
+
94
+ Using tinymce-rails as an Engine Dependency
95
+ -------------------------------------------
96
+
97
+ Ensure that you explicitly require `tinymce-rails` within your engine file. Including tinymce-rails as a dependency in your gemspec is not enough.
62
98
 
63
99
 
64
100
  Updating
data/Rakefile CHANGED
@@ -1,7 +1,4 @@
1
- unless defined? TinyMCE::VERSION
2
- $:.unshift File.expand_path("../lib", __FILE__)
3
- require "tinymce/version"
4
- end
1
+ require File.expand_path('../lib/tinymce/rails/version', __FILE__)
5
2
 
6
3
  def step(name)
7
4
  print "#{name} ..."
@@ -15,29 +12,29 @@ def download(url, filename)
15
12
  `curl -L -# #{url} -o tmp/#{filename}`
16
13
  end
17
14
 
18
- desc "Update TinyMCE to version specified in lib/tinymce/version.rb"
15
+ desc "Update TinyMCE to version #{TinyMCE::Rails::TINYMCE_VERSION}"
19
16
  task :update => [ :fetch, :extract, :process ]
20
17
 
21
18
  task :fetch do
22
- download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::TINYMCE_VERSION}.zip", "tinymce.zip")
23
- download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::TINYMCE_VERSION}_jquery.zip", "tinymce.jquery.zip")
19
+ download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}.zip", "tinymce.zip")
20
+ download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}_jquery.zip", "tinymce.jquery.zip")
24
21
  end
25
22
 
26
23
  task :extract do
27
24
  step "Extracting core files" do
28
25
  `rm -rf tmp/tinymce`
29
26
  `unzip -u tmp/tinymce.zip -d tmp`
30
- `rm -rf assets/precompiled/tinymce`
31
- `mkdir -p assets/precompiled/tinymce`
32
- `mv tmp/tinymce/jscripts/tiny_mce/* assets/precompiled/tinymce/`
27
+ `rm -rf vendor/assets/javascripts/tinymce`
28
+ `mkdir -p vendor/assets/javascripts/tinymce`
29
+ `mv tmp/tinymce/jscripts/tiny_mce/* vendor/assets/javascripts/tinymce/`
33
30
  end
34
31
 
35
32
  step "Extracting jQuery files" do
36
33
  `rm -rf tmp/tinymce`
37
34
  `unzip -u tmp/tinymce.jquery.zip -d tmp`
38
- `mv tmp/tinymce/jscripts/tiny_mce/jquery.tinymce.js assets/precompiled/tinymce/jquery.tinymce.js`
39
- `mv tmp/tinymce/jscripts/tiny_mce/tiny_mce.js assets/precompiled/tinymce/tiny_mce_jquery.js`
40
- `mv tmp/tinymce/jscripts/tiny_mce/tiny_mce_src.js assets/precompiled/tinymce/tiny_mce_jquery_src.js`
35
+ `mv tmp/tinymce/jscripts/tiny_mce/jquery.tinymce.js vendor/assets/javascripts/tinymce/jquery.tinymce.js`
36
+ `mv tmp/tinymce/jscripts/tiny_mce/tiny_mce.js vendor/assets/javascripts/tinymce/tiny_mce_jquery.js`
37
+ `mv tmp/tinymce/jscripts/tiny_mce/tiny_mce_src.js vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js`
41
38
  end
42
39
  end
43
40
 
@@ -45,15 +42,9 @@ task :process do
45
42
  step "Fixing file encoding" do
46
43
  require 'iconv'
47
44
  converter = Iconv.new('UTF-8', 'ISO-8859-1')
48
- Dir["assets/precompiled/tinymce/**/*.js"].each do |file|
45
+ Dir["vendor/assets/javascripts/tinymce/**/*.js"].each do |file|
49
46
  contents = converter.iconv(File.read(file)).force_encoding('UTF-8')
50
47
  File.open(file, 'w') { |f| f.write(contents) }
51
48
  end
52
49
  end
53
-
54
- step "Copying includeable assets" do
55
- `cp assets/precompiled/tinymce/tiny_mce_src.js assets/vendor/tinymce/tiny_mce.js`
56
- `cp assets/precompiled/tinymce/tiny_mce_jquery_src.js assets/vendor/tinymce/tiny_mce_jquery.js`
57
- `cp assets/precompiled/tinymce/jquery.tinymce.js assets/vendor/tinymce/jquery-tinymce.js`
58
- end
59
50
  end
@@ -0,0 +1,3 @@
1
+ //= require tinymce/preinit.js
2
+ //= require tinymce/tiny_mce_jquery_src.js
3
+ //= require tinymce/jquery.tinymce.js
@@ -0,0 +1,2 @@
1
+ //= require tinymce/preinit.js
2
+ //= require tinymce/tiny_mce_src.js
@@ -0,0 +1,5 @@
1
+ window.tinyMCEPreInit = window.tinyMCEPreInit || {
2
+ base: '<%= TinyMCE::Rails::Engine.config.tinymce.base || asset_path("tinymce", :digest => false) %>',
3
+ query: '<%= TinyMCE::Rails::VERSION %>',
4
+ suffix: ''
5
+ };
@@ -0,0 +1,7 @@
1
+ Rake::Task['assets:precompile:primary'].enhance do
2
+ assets = File.expand_path(File.dirname(__FILE__) + "/../../vendor/assets/javascripts/tinymce")
3
+ target = File.join(Rails.public_path, Rails.application.config.assets.prefix)
4
+
5
+ mkdir_p target
6
+ cp_r assets, target
7
+ end
data/lib/tinymce-rails.rb CHANGED
@@ -1,2 +1 @@
1
- require "tinymce/version"
2
- require "tinymce/railtie"
1
+ require "tinymce/rails"
@@ -0,0 +1,12 @@
1
+ module TinyMCE
2
+ module Rails
3
+ require 'tinymce/rails/engine'
4
+ require 'tinymce/rails/version'
5
+ require "tinymce/rails/configuration"
6
+ require "tinymce/rails/helper"
7
+
8
+ def self.configuration
9
+ @configuration ||= Configuration.load(::Rails.root.join("config/tinymce.yml"))
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,67 @@
1
+ module TinyMCE::Rails
2
+ class Configuration
3
+ def self.defaults
4
+ {
5
+ "mode" => "specific_textareas",
6
+ "editor_selector" => "tinymce",
7
+ "theme" => "advanced"
8
+ }
9
+ end
10
+
11
+ attr_reader :options
12
+
13
+ def initialize(options)
14
+ @options = options
15
+ end
16
+
17
+ def options_for_tinymce
18
+ result = {}
19
+
20
+ options.each do |key, value|
21
+ if value.is_a?(Array) && value.all? { |v| v.is_a?(String) }
22
+ result[key] = value.join(",")
23
+ else
24
+ result[key] = value
25
+ end
26
+ end
27
+
28
+ result["language"] ||= self.class.default_language
29
+
30
+ result
31
+ end
32
+
33
+ def merge(options)
34
+ self.class.new(self.options.merge(options))
35
+ end
36
+
37
+ def load(filename)
38
+ options.merge!(YAML::load(ERB.new(IO.read(filename)).result))
39
+ end
40
+
41
+ def self.load(filename)
42
+ config = new(defaults)
43
+ config.load(filename) if File.exists?(filename)
44
+ config
45
+ end
46
+
47
+ # Default language falls back to English if current locale is not available.
48
+ def self.default_language
49
+ available_languages.include?(I18n.locale.to_s) ? I18n.locale.to_s : "en"
50
+ end
51
+
52
+ # Searches asset paths for TinyMCE language files.
53
+ def self.available_languages
54
+ assets.paths.map { |path|
55
+ files = assets.entries(File.join(path, "tinymce/langs"))
56
+ files.map { |file|
57
+ asset = assets.attributes_for(File.join(path, file))
58
+ asset.logical_path.sub(/\.js$/, "")
59
+ }
60
+ }.flatten.uniq
61
+ end
62
+
63
+ def self.assets
64
+ Rails.application.assets
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,16 @@
1
+ module TinyMCE::Rails
2
+ class Engine < ::Rails::Engine
3
+ config.tinymce = ActiveSupport::OrderedOptions.new
4
+
5
+ # Set an explicit base path for TinyMCE assets (usually defaults to /assets/tinymce)
6
+ config.tinymce.base = nil
7
+
8
+ initializer "precompile", :group => :all do |app|
9
+ app.config.assets.precompile << "tinymce.js"
10
+ end
11
+
12
+ initializer "helper" do |app|
13
+ ActionController::Base.helper(Helper)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,29 @@
1
+ module TinyMCE::Rails
2
+ module Helper
3
+ # Initializes TinyMCE on the current page based on the global configuration.
4
+ #
5
+ # Custom options can be set via the options hash, which will be passed to
6
+ # the TinyMCE init function.
7
+ #
8
+ # By default, all textareas with a class of "tinymce" will have the TinyMCE
9
+ # editor applied. The current locale will also be used as the language when
10
+ # TinyMCE language files are available, falling back to English if not
11
+ # available. The :editor_selector and :language options can be used to
12
+ # override these defaults.
13
+ #
14
+ # @example
15
+ # <%= tinymce(:theme => "advanced", :editor_selector => "editorClass") %>
16
+ def tinymce(options={})
17
+ configuration = TinyMCE::Rails.configuration.merge(options)
18
+
19
+ javascript_tag do
20
+ "tinyMCE.init(#{configuration.options_for_tinymce.to_json});".html_safe
21
+ end
22
+ end
23
+
24
+ # Includes TinyMCE javascript assets via a script tag.
25
+ def tinymce_assets
26
+ javascript_include_tag "tinymce"
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,6 @@
1
+ module TinyMCE
2
+ module Rails
3
+ VERSION = "3.4.9"
4
+ TINYMCE_VERSION = "3.4.9"
5
+ end
6
+ end
@@ -0,0 +1 @@
1
+ (function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}p.css("visibility","hidden");function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);s.onInit.add(function(){var x,y=v;p.css("visibility","");if(v){if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}}})});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit=c.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;if(j.script_loaded){j.script_loaded()}o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}return p};b.extend(b.expr[":"],{tinymce:function(g){return !!(g.id&&tinyMCE.get(g.id))}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==e){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(b(v),q)});return r}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery);
@@ -54,6 +54,13 @@ function init() {
54
54
  document.getElementById('popupurl').style.width = '180px';
55
55
 
56
56
  elm = inst.dom.getParent(elm, "A");
57
+ if (elm == null) {
58
+ var prospect = inst.dom.create("p", null, inst.selection.getContent());
59
+ if (prospect.childNodes.length === 1) {
60
+ elm = prospect.firstChild;
61
+ }
62
+ }
63
+
57
64
  if (elm != null && elm.nodeName == "A")
58
65
  action = "update";
59
66
 
@@ -503,7 +510,7 @@ function getTargetListHTML(elm_id, target_form_element) {
503
510
  var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
504
511
  var html = '';
505
512
 
506
- html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
513
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
507
514
  html += 'this.options[this.selectedIndex].value;">';
508
515
  html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
509
516
  html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
@@ -0,0 +1 @@
1
+ (function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
@@ -11,7 +11,7 @@
11
11
  (function() {
12
12
  /**
13
13
  * Auto Resize
14
- *
14
+ *
15
15
  * This plugin automatically resizes the content area to fit its content height.
16
16
  * It will retain a minimum height, which is the height of the content area when
17
17
  * it's initialized.
@@ -35,10 +35,10 @@
35
35
  * This method gets executed each time the editor needs to resize.
36
36
  */
37
37
  function resize() {
38
- var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
38
+ var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
39
39
 
40
40
  // Get height differently depending on the browser used
41
- myHeight = tinymce.isIE ? b.scrollHeight : d.body.offsetHeight;
41
+ myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
42
42
 
43
43
  // Don't make it smaller than the minimum height
44
44
  if (myHeight > t.autoresize_min_height)
@@ -47,30 +47,34 @@
47
47
  // If a maximum height has been defined don't exceed this height
48
48
  if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
49
49
  resizeHeight = t.autoresize_max_height;
50
- ed.getBody().style.overflowY = "auto";
51
- } else
52
- ed.getBody().style.overflowY = "hidden";
50
+ body.style.overflowY = "auto";
51
+ de.style.overflowY = "auto"; // Old IE
52
+ } else {
53
+ body.style.overflowY = "hidden";
54
+ de.style.overflowY = "hidden"; // Old IE
55
+ body.scrollTop = 0;
56
+ }
53
57
 
54
58
  // Resize content element
55
59
  if (resizeHeight !== oldSize) {
60
+ deltaSize = resizeHeight - oldSize;
56
61
  DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
57
62
  oldSize = resizeHeight;
58
- }
59
63
 
60
- // if we're throbbing, we'll re-throb to match the new size
61
- if (t.throbbing) {
62
- ed.setProgressState(false);
63
- ed.setProgressState(true);
64
+ // WebKit doesn't decrease the size of the body element until the iframe gets resized
65
+ // So we need to continue to resize the iframe down until the size gets fixed
66
+ if (tinymce.isWebKit && deltaSize < 0)
67
+ resize();
64
68
  }
65
69
  };
66
70
 
67
71
  t.editor = ed;
68
72
 
69
73
  // Define minimum height
70
- t.autoresize_min_height = parseInt( ed.getParam('autoresize_min_height', ed.getElement().offsetHeight) );
74
+ t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
71
75
 
72
- // Define maximum height
73
- t.autoresize_max_height = parseInt( ed.getParam('autoresize_max_height', 0) );
76
+ // Define maximum height
77
+ t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
74
78
 
75
79
  // Add padding at the bottom for better UX
76
80
  ed.onInit.add(function(ed){
@@ -85,30 +89,8 @@
85
89
  ed.onPostRender.add(resize);
86
90
 
87
91
  if (ed.getParam('autoresize_on_init', true)) {
88
- // Things to do when the editor is ready
89
- ed.onInit.add(function(ed, l) {
90
- // Show throbber until content area is resized properly
91
- ed.setProgressState(true);
92
- t.throbbing = true;
93
-
94
- // Hide scrollbars
95
- ed.getBody().style.overflowY = "hidden";
96
- });
97
-
98
- ed.onLoadContent.add(function(ed, l) {
99
- resize();
100
-
101
- // Because the content area resizes when its content CSS loads,
102
- // and we can't easily add a listener to its onload event,
103
- // we'll just trigger a resize after a short loading period
104
- setTimeout(function() {
105
- resize();
106
-
107
- // Disable throbber
108
- ed.setProgressState(false);
109
- t.throbbing = false;
110
- }, 1250);
111
- });
92
+ ed.onLoad.add(resize);
93
+ ed.onLoadContent.add(resize);
112
94
  }
113
95
 
114
96
  // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');