tinymce-rails 3.5.11.1 → 4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (336) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +40 -103
  3. data/Rakefile +10 -15
  4. data/app/assets/javascripts/tinymce-jquery.js +1 -1
  5. data/app/assets/javascripts/tinymce.js +1 -1
  6. data/app/assets/javascripts/tinymce/preinit.js.erb +1 -2
  7. data/lib/tasks/tinymce-assets.rake +3 -6
  8. data/lib/tinymce/rails.rb +1 -1
  9. data/lib/tinymce/rails/asset_installer.rb +36 -34
  10. data/lib/tinymce/rails/asset_manifest.rb +89 -108
  11. data/lib/tinymce/rails/configuration.rb +36 -29
  12. data/lib/tinymce/rails/engine.rb +1 -40
  13. data/lib/tinymce/rails/helper.rb +5 -9
  14. data/lib/tinymce/rails/version.rb +2 -2
  15. data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/langs/readme.md +3 -0
  17. data/vendor/assets/javascripts/tinymce/license.txt +504 -504
  18. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -0
  19. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -0
  20. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -0
  21. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -0
  22. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -0
  23. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -0
  24. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -0
  25. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -0
  26. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/editable_selects.js +70 -70
  27. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/form_utils.js +210 -210
  28. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/mctabs.js +161 -161
  29. data/vendor/assets/javascripts/tinymce/plugins/compat3x/tiny_mce_popup.js +435 -0
  30. data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/validate.js +252 -252
  31. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -0
  32. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -0
  33. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cool.gif +0 -0
  34. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cry.gif +0 -0
  35. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-embarassed.gif +0 -0
  36. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-foot-in-mouth.gif +0 -0
  37. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-frown.gif +0 -0
  38. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-innocent.gif +0 -0
  39. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-kiss.gif +0 -0
  40. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-laughing.gif +0 -0
  41. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-money-mouth.gif +0 -0
  42. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-sealed.gif +0 -0
  43. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-smile.gif +0 -0
  44. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-surprised.gif +0 -0
  45. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-tongue-out.gif +0 -0
  46. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-undecided.gif +0 -0
  47. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-wink.gif +0 -0
  48. data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-yell.gif +0 -0
  49. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -0
  50. data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +1 -0
  51. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/plugin.js +1 -0
  52. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -0
  53. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -0
  54. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -0
  55. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -0
  56. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -0
  57. data/vendor/assets/javascripts/tinymce/plugins/layer/plugin.js +1 -0
  58. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -0
  59. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -0
  60. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -0
  61. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -0
  62. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -0
  63. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -0
  64. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -0
  65. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -0
  66. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -0
  67. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -0
  68. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -0
  69. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -0
  70. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -0
  71. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -0
  72. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -0
  73. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -0
  74. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -0
  75. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +114 -21
  76. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -0
  77. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -0
  78. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -0
  79. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -0
  80. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -0
  81. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.eot +0 -0
  82. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.svg +166 -0
  83. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.ttf +0 -0
  84. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.woff +0 -0
  85. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.eot +0 -0
  86. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.svg +150 -0
  87. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.ttf +0 -0
  88. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.woff +0 -0
  89. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/readme.md +1 -0
  90. data/vendor/assets/javascripts/tinymce/skins/lightgray/img/anchor.gif +0 -0
  91. data/vendor/assets/javascripts/tinymce/skins/lightgray/img/loader.gif +0 -0
  92. data/vendor/assets/javascripts/tinymce/skins/lightgray/img/object.gif +0 -0
  93. data/vendor/assets/javascripts/tinymce/{themes/advanced → skins/lightgray}/img/trans.gif +0 -0
  94. data/vendor/assets/javascripts/tinymce/{plugins/spellchecker → skins/lightgray}/img/wline.gif +0 -0
  95. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  96. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -0
  97. data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -0
  98. data/vendor/assets/javascripts/tinymce/tinymce.js +10 -0
  99. data/vendor/assets/javascripts/tinymce/tinymce_jquery.js +9 -0
  100. metadata +100 -272
  101. checksums.yaml +0 -7
  102. data/lib/tinymce/rails/asset_installer/compile.rb +0 -44
  103. data/lib/tinymce/rails/asset_installer/copy.rb +0 -52
  104. data/vendor/assets/javascripts/tinymce/langs/en.js +0 -1
  105. data/vendor/assets/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
  106. data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
  107. data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
  108. data/vendor/assets/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
  109. data/vendor/assets/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -1
  110. data/vendor/assets/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
  111. data/vendor/assets/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
  112. data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
  113. data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
  114. data/vendor/assets/javascripts/tinymce/plugins/advimage/image.htm +0 -235
  115. data/vendor/assets/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
  116. data/vendor/assets/javascripts/tinymce/plugins/advimage/js/image.js +0 -464
  117. data/vendor/assets/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -1
  118. data/vendor/assets/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
  119. data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
  120. data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
  121. data/vendor/assets/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -543
  122. data/vendor/assets/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -1
  123. data/vendor/assets/javascripts/tinymce/plugins/advlink/link.htm +0 -338
  124. data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
  125. data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -176
  126. data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin.js +0 -1
  127. data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +0 -184
  128. data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
  129. data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
  130. data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
  131. data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -433
  132. data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
  133. data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
  134. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
  135. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -163
  136. data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
  137. data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -85
  138. data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
  139. data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
  140. data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +0 -42
  141. data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -43
  142. data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -1
  143. data/vendor/assets/javascripts/tinymce/plugins/example/dialog.htm +0 -22
  144. data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
  145. data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
  146. data/vendor/assets/javascripts/tinymce/plugins/example/img/example.gif +0 -0
  147. data/vendor/assets/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
  148. data/vendor/assets/javascripts/tinymce/plugins/example/langs/en.js +0 -3
  149. data/vendor/assets/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
  150. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin.js +0 -1
  151. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -50
  152. data/vendor/assets/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -143
  153. data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
  154. data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -405
  155. data/vendor/assets/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -259
  156. data/vendor/assets/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -232
  157. data/vendor/assets/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -1
  158. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
  159. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -234
  160. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -117
  161. data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
  162. data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
  163. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
  164. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -699
  165. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  166. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  167. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  168. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  169. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  170. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  171. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  172. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
  173. data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
  174. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
  175. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  176. data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
  177. data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -262
  178. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
  179. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  180. data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +0 -1
  181. data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin_src.js +0 -955
  182. data/vendor/assets/javascripts/tinymce/plugins/media/css/media.css +0 -17
  183. data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
  184. data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -898
  185. data/vendor/assets/javascripts/tinymce/plugins/media/js/embed.js +0 -73
  186. data/vendor/assets/javascripts/tinymce/plugins/media/js/media.js +0 -513
  187. data/vendor/assets/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -1
  188. data/vendor/assets/javascripts/tinymce/plugins/media/media.htm +0 -922
  189. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
  190. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -54
  191. data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
  192. data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -537
  193. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
  194. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
  195. data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
  196. data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -887
  197. data/vendor/assets/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
  198. data/vendor/assets/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
  199. data/vendor/assets/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -1
  200. data/vendor/assets/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
  201. data/vendor/assets/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
  202. data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
  203. data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
  204. data/vendor/assets/javascripts/tinymce/plugins/preview/example.html +0 -28
  205. data/vendor/assets/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
  206. data/vendor/assets/javascripts/tinymce/plugins/preview/preview.html +0 -17
  207. data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
  208. data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
  209. data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
  210. data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
  211. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
  212. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
  213. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
  214. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -152
  215. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -1
  216. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
  217. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
  218. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
  219. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -471
  220. data/vendor/assets/javascripts/tinymce/plugins/style/css/props.css +0 -14
  221. data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
  222. data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -71
  223. data/vendor/assets/javascripts/tinymce/plugins/style/js/props.js +0 -709
  224. data/vendor/assets/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -1
  225. data/vendor/assets/javascripts/tinymce/plugins/style/props.htm +0 -845
  226. data/vendor/assets/javascripts/tinymce/plugins/style/readme.txt +0 -19
  227. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
  228. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -122
  229. data/vendor/assets/javascripts/tinymce/plugins/table/cell.htm +0 -180
  230. data/vendor/assets/javascripts/tinymce/plugins/table/css/cell.css +0 -17
  231. data/vendor/assets/javascripts/tinymce/plugins/table/css/row.css +0 -25
  232. data/vendor/assets/javascripts/tinymce/plugins/table/css/table.css +0 -13
  233. data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
  234. data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1456
  235. data/vendor/assets/javascripts/tinymce/plugins/table/js/cell.js +0 -319
  236. data/vendor/assets/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
  237. data/vendor/assets/javascripts/tinymce/plugins/table/js/row.js +0 -254
  238. data/vendor/assets/javascripts/tinymce/plugins/table/js/table.js +0 -501
  239. data/vendor/assets/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -1
  240. data/vendor/assets/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
  241. data/vendor/assets/javascripts/tinymce/plugins/table/row.htm +0 -158
  242. data/vendor/assets/javascripts/tinymce/plugins/table/table.htm +0 -188
  243. data/vendor/assets/javascripts/tinymce/plugins/template/blank.htm +0 -12
  244. data/vendor/assets/javascripts/tinymce/plugins/template/css/template.css +0 -23
  245. data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
  246. data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
  247. data/vendor/assets/javascripts/tinymce/plugins/template/js/template.js +0 -106
  248. data/vendor/assets/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -1
  249. data/vendor/assets/javascripts/tinymce/plugins/template/template.htm +0 -31
  250. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin.js +0 -1
  251. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin_src.js +0 -63
  252. data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
  253. data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
  254. data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
  255. data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -122
  256. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
  257. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
  258. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
  259. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
  260. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
  261. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
  262. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
  263. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  264. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  265. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
  266. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
  267. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
  268. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -111
  269. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
  270. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
  271. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
  272. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
  273. data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -1
  274. data/vendor/assets/javascripts/tinymce/themes/advanced/about.htm +0 -52
  275. data/vendor/assets/javascripts/tinymce/themes/advanced/anchor.htm +0 -26
  276. data/vendor/assets/javascripts/tinymce/themes/advanced/charmap.htm +0 -55
  277. data/vendor/assets/javascripts/tinymce/themes/advanced/color_picker.htm +0 -70
  278. data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +0 -1
  279. data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template_src.js +0 -1490
  280. data/vendor/assets/javascripts/tinymce/themes/advanced/image.htm +0 -80
  281. data/vendor/assets/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  282. data/vendor/assets/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
  283. data/vendor/assets/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
  284. data/vendor/assets/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
  285. data/vendor/assets/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  286. data/vendor/assets/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
  287. data/vendor/assets/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
  288. data/vendor/assets/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
  289. data/vendor/assets/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
  290. data/vendor/assets/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  291. data/vendor/assets/javascripts/tinymce/themes/advanced/js/about.js +0 -73
  292. data/vendor/assets/javascripts/tinymce/themes/advanced/js/anchor.js +0 -56
  293. data/vendor/assets/javascripts/tinymce/themes/advanced/js/charmap.js +0 -363
  294. data/vendor/assets/javascripts/tinymce/themes/advanced/js/color_picker.js +0 -345
  295. data/vendor/assets/javascripts/tinymce/themes/advanced/js/image.js +0 -253
  296. data/vendor/assets/javascripts/tinymce/themes/advanced/js/link.js +0 -159
  297. data/vendor/assets/javascripts/tinymce/themes/advanced/js/source_editor.js +0 -78
  298. data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en.js +0 -1
  299. data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +0 -1
  300. data/vendor/assets/javascripts/tinymce/themes/advanced/link.htm +0 -57
  301. data/vendor/assets/javascripts/tinymce/themes/advanced/shortcuts.htm +0 -47
  302. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -50
  303. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/dialog.css +0 -118
  304. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
  305. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
  306. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  307. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  308. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
  309. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
  310. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/ui.css +0 -219
  311. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -24
  312. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -106
  313. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -106
  314. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -48
  315. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -118
  316. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  317. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  318. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  319. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +0 -222
  320. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
  321. data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
  322. data/vendor/assets/javascripts/tinymce/themes/advanced/source_editor.htm +0 -25
  323. data/vendor/assets/javascripts/tinymce/themes/simple/editor_template.js +0 -1
  324. data/vendor/assets/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
  325. data/vendor/assets/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
  326. data/vendor/assets/javascripts/tinymce/themes/simple/langs/en.js +0 -1
  327. data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
  328. data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
  329. data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
  330. data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  331. data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +0 -35
  332. data/vendor/assets/javascripts/tinymce/tiny_mce.js +0 -1
  333. data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +0 -1
  334. data/vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js +0 -17942
  335. data/vendor/assets/javascripts/tinymce/tiny_mce_popup.js +0 -5
  336. data/vendor/assets/javascripts/tinymce/tiny_mce_src.js +0 -19156
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>':"&nbsp;")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})();
@@ -1,54 +0,0 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- tinymce.create('tinymce.plugins.Nonbreaking', {
13
- init : function(ed, url) {
14
- var t = this;
15
-
16
- t.editor = ed;
17
-
18
- // Register commands
19
- ed.addCommand('mceNonBreaking', function() {
20
- ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>' : '&nbsp;');
21
- });
22
-
23
- // Register buttons
24
- ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
25
-
26
- if (ed.getParam('nonbreaking_force_tab')) {
27
- ed.onKeyDown.add(function(ed, e) {
28
- if (e.keyCode == 9) {
29
- e.preventDefault();
30
-
31
- ed.execCommand('mceNonBreaking');
32
- ed.execCommand('mceNonBreaking');
33
- ed.execCommand('mceNonBreaking');
34
- }
35
- });
36
- }
37
- },
38
-
39
- getInfo : function() {
40
- return {
41
- longname : 'Nonbreaking space',
42
- author : 'Moxiecode Systems AB',
43
- authorurl : 'http://tinymce.moxiecode.com',
44
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
45
- version : tinymce.majorVersion + "." + tinymce.minorVersion
46
- };
47
- }
48
-
49
- // Private methods
50
- });
51
-
52
- // Register plugin
53
- tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
54
- })();
@@ -1 +0,0 @@
1
- (function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret",r="\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F<z)||(D?F==z:F==0)){return}}else{if(F<A.childNodes.length){var G=!D&&F>0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(z,B){var F=B.keyCode,x,C,D,v;function u(H,G){while(H=H[G?"previousSibling":"nextSibling"]){if(H.nodeType!==3||H.nodeValue.length>0){return H}}}function y(G,H){p.select(G);p.collapse(H)}function t(K){var J,I,M,H;function G(O){var N=I;while(N){if(N===O){return}N=N.parentNode}j.remove(O);q()}function L(){var O,P,N=z.schema.getNonEmptyElements();P=new tinymce.dom.TreeWalker(I,z.getBody());while(O=(K?P.prev():P.next())){if(N[O.nodeName.toLowerCase()]){break}if(O.nodeType===3&&tinymce.trim(O.nodeValue).length>0){break}if(m(O)==="false"){G(O);return true}}if(g(O)){return true}return false}if(p.isCollapsed()){J=p.getRng(true);I=J.startContainer;M=J.startOffset;I=l(I)||I;if(H=g(I)){G(H);return false}if(I.nodeType==3&&(K?M>0:M<I.nodeValue.length)){return true}if(I.nodeType==1){I=I.childNodes[M]||I}if(L()){return false}}return true}D=p.getStart();v=p.getEnd();x=g(D)||g(v);if(x&&(F<112||F>124)&&F!=e.DELETE&&F!=e.BACKSPACE){if((tinymce.isMac?B.metaKey:B.ctrlKey)&&(F==67||F==88||F==86)){return}B.preventDefault();if(F==e.LEFT||F==e.RIGHT){var w=F==e.LEFT;if(z.dom.isBlock(x)){var A=w?x.previousSibling:x.nextSibling;var s=new c(A,A);var E=w?s.prev():s.next();y(E,!w)}else{y(x,w)}}}else{if(F==e.LEFT||F==e.RIGHT||F==e.BACKSPACE||F==e.DELETE){C=l(D);if(C){if(F==e.LEFT||F==e.BACKSPACE){x=u(C,true);if(x&&m(x)==="false"){B.preventDefault();if(F==e.LEFT){y(x,true)}else{j.remove(x);return}}else{i(C)}}if(F==e.RIGHT||F==e.DELETE){x=u(C);if(x&&m(x)==="false"){B.preventDefault();if(F==e.RIGHT){y(x,false)}else{j.remove(x);return}}else{i(C)}}}if((F==e.BACKSPACE||F==e.DELETE)&&!t(F==e.BACKSPACE)){B.preventDefault();return false}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return'<span class="'+l+'" data-mce-content="'+m.dom.encode(r[0])+'">'+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+"</span>"})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})();
@@ -1,537 +0,0 @@
1
- /**
2
- * editor_plugin_src.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under LGPL License.
6
- *
7
- * License: http://tinymce.moxiecode.com/license
8
- * Contributing: http://tinymce.moxiecode.com/contributing
9
- */
10
-
11
- (function() {
12
- var TreeWalker = tinymce.dom.TreeWalker;
13
- var externalName = 'contenteditable', internalName = 'data-mce-' + externalName;
14
- var VK = tinymce.VK;
15
-
16
- function handleContentEditableSelection(ed) {
17
- var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF';
18
-
19
- // Returns the content editable state of a node "true/false" or null
20
- function getContentEditable(node) {
21
- var contentEditable;
22
-
23
- // Ignore non elements
24
- if (node.nodeType === 1) {
25
- // Check for fake content editable
26
- contentEditable = node.getAttribute(internalName);
27
- if (contentEditable && contentEditable !== "inherit") {
28
- return contentEditable;
29
- }
30
-
31
- // Check for real content editable
32
- contentEditable = node.contentEditable;
33
- if (contentEditable !== "inherit") {
34
- return contentEditable;
35
- }
36
- }
37
-
38
- return null;
39
- };
40
-
41
- // Returns the noneditable parent or null if there is a editable before it or if it wasn't found
42
- function getNonEditableParent(node) {
43
- var state;
44
-
45
- while (node) {
46
- state = getContentEditable(node);
47
- if (state) {
48
- return state === "false" ? node : null;
49
- }
50
-
51
- node = node.parentNode;
52
- }
53
- };
54
-
55
- // Get caret container parent for the specified node
56
- function getParentCaretContainer(node) {
57
- while (node) {
58
- if (node.id === caretContainerId) {
59
- return node;
60
- }
61
-
62
- node = node.parentNode;
63
- }
64
- };
65
-
66
- // Finds the first text node in the specified node
67
- function findFirstTextNode(node) {
68
- var walker;
69
-
70
- if (node) {
71
- walker = new TreeWalker(node, node);
72
-
73
- for (node = walker.current(); node; node = walker.next()) {
74
- if (node.nodeType === 3) {
75
- return node;
76
- }
77
- }
78
- }
79
- };
80
-
81
- // Insert caret container before/after target or expand selection to include block
82
- function insertCaretContainerOrExpandToBlock(target, before) {
83
- var caretContainer, rng;
84
-
85
- // Select block
86
- if (getContentEditable(target) === "false") {
87
- if (dom.isBlock(target)) {
88
- selection.select(target);
89
- return;
90
- }
91
- }
92
-
93
- rng = dom.createRng();
94
-
95
- if (getContentEditable(target) === "true") {
96
- if (!target.firstChild) {
97
- target.appendChild(ed.getDoc().createTextNode('\u00a0'));
98
- }
99
-
100
- target = target.firstChild;
101
- before = true;
102
- }
103
-
104
- //caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar);
105
- caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar);
106
-
107
- if (before) {
108
- target.parentNode.insertBefore(caretContainer, target);
109
- } else {
110
- dom.insertAfter(caretContainer, target);
111
- }
112
-
113
- rng.setStart(caretContainer.firstChild, 1);
114
- rng.collapse(true);
115
- selection.setRng(rng);
116
-
117
- return caretContainer;
118
- };
119
-
120
- // Removes any caret container except the one we might be in
121
- function removeCaretContainer(caretContainer) {
122
- var child, currentCaretContainer, lastContainer;
123
-
124
- if (caretContainer) {
125
- rng = selection.getRng(true);
126
- rng.setStartBefore(caretContainer);
127
- rng.setEndBefore(caretContainer);
128
-
129
- child = findFirstTextNode(caretContainer);
130
- if (child && child.nodeValue.charAt(0) == invisibleChar) {
131
- child = child.deleteData(0, 1);
132
- }
133
-
134
- dom.remove(caretContainer, true);
135
-
136
- selection.setRng(rng);
137
- } else {
138
- currentCaretContainer = getParentCaretContainer(selection.getStart());
139
- while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) {
140
- if (currentCaretContainer !== caretContainer) {
141
- child = findFirstTextNode(caretContainer);
142
- if (child && child.nodeValue.charAt(0) == invisibleChar) {
143
- child = child.deleteData(0, 1);
144
- }
145
-
146
- dom.remove(caretContainer, true);
147
- }
148
-
149
- lastContainer = caretContainer;
150
- }
151
- }
152
- };
153
-
154
- // Modifies the selection to include contentEditable false elements or insert caret containers
155
- function moveSelection() {
156
- var nonEditableStart, nonEditableEnd, isCollapsed, rng, element;
157
-
158
- // Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside
159
- function hasSideContent(element, left) {
160
- var container, offset, walker, node, len;
161
-
162
- container = rng.startContainer;
163
- offset = rng.startOffset;
164
-
165
- // If endpoint is in middle of text node then expand to beginning/end of element
166
- if (container.nodeType == 3) {
167
- len = container.nodeValue.length;
168
- if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) {
169
- return;
170
- }
171
- } else {
172
- // Can we resolve the node by index
173
- if (offset < container.childNodes.length) {
174
- // Browser represents caret position as the offset at the start of an element. When moving right
175
- // this is the element we are moving into so we consider our container to be child node at offset-1
176
- var pos = !left && offset > 0 ? offset-1 : offset;
177
- container = container.childNodes[pos];
178
- if (container.hasChildNodes()) {
179
- container = container.firstChild;
180
- }
181
- } else {
182
- // If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element
183
- return !left ? element : null;
184
- }
185
- }
186
-
187
- // Walk left/right to look for contents
188
- walker = new TreeWalker(container, element);
189
- while (node = walker[left ? 'prev' : 'next']()) {
190
- if (node.nodeType === 3 && node.nodeValue.length > 0) {
191
- return;
192
- } else if (getContentEditable(node) === "true") {
193
- // Found contentEditable=true element return this one to we can move the caret inside it
194
- return node;
195
- }
196
- }
197
-
198
- return element;
199
- };
200
-
201
- // Remove any existing caret containers
202
- removeCaretContainer();
203
-
204
- // Get noneditable start/end elements
205
- isCollapsed = selection.isCollapsed();
206
- nonEditableStart = getNonEditableParent(selection.getStart());
207
- nonEditableEnd = getNonEditableParent(selection.getEnd());
208
-
209
- // Is any fo the range endpoints noneditable
210
- if (nonEditableStart || nonEditableEnd) {
211
- rng = selection.getRng(true);
212
-
213
- // If it's a caret selection then look left/right to see if we need to move the caret out side or expand
214
- if (isCollapsed) {
215
- nonEditableStart = nonEditableStart || nonEditableEnd;
216
- var start = selection.getStart();
217
- if (element = hasSideContent(nonEditableStart, true)) {
218
- // We have no contents to the left of the caret then insert a caret container before the noneditable element
219
- insertCaretContainerOrExpandToBlock(element, true);
220
- } else if (element = hasSideContent(nonEditableStart, false)) {
221
- // We have no contents to the right of the caret then insert a caret container after the noneditable element
222
- insertCaretContainerOrExpandToBlock(element, false);
223
- } else {
224
- // We are in the middle of a noneditable so expand to select it
225
- selection.select(nonEditableStart);
226
- }
227
- } else {
228
- rng = selection.getRng(true);
229
-
230
- // Expand selection to include start non editable element
231
- if (nonEditableStart) {
232
- rng.setStartBefore(nonEditableStart);
233
- }
234
-
235
- // Expand selection to include end non editable element
236
- if (nonEditableEnd) {
237
- rng.setEndAfter(nonEditableEnd);
238
- }
239
-
240
- selection.setRng(rng);
241
- }
242
- }
243
- };
244
-
245
- function handleKey(ed, e) {
246
- var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement;
247
-
248
- function getNonEmptyTextNodeSibling(node, prev) {
249
- while (node = node[prev ? 'previousSibling' : 'nextSibling']) {
250
- if (node.nodeType !== 3 || node.nodeValue.length > 0) {
251
- return node;
252
- }
253
- }
254
- };
255
-
256
- function positionCaretOnElement(element, start) {
257
- selection.select(element);
258
- selection.collapse(start);
259
- }
260
-
261
- function canDelete(backspace) {
262
- var rng, container, offset, nonEditableParent;
263
-
264
- function removeNodeIfNotParent(node) {
265
- var parent = container;
266
-
267
- while (parent) {
268
- if (parent === node) {
269
- return;
270
- }
271
-
272
- parent = parent.parentNode;
273
- }
274
-
275
- dom.remove(node);
276
- moveSelection();
277
- }
278
-
279
- function isNextPrevTreeNodeNonEditable() {
280
- var node, walker, nonEmptyElements = ed.schema.getNonEmptyElements();
281
-
282
- walker = new tinymce.dom.TreeWalker(container, ed.getBody());
283
- while (node = (backspace ? walker.prev() : walker.next())) {
284
- // Found IMG/INPUT etc
285
- if (nonEmptyElements[node.nodeName.toLowerCase()]) {
286
- break;
287
- }
288
-
289
- // Found text node with contents
290
- if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) {
291
- break;
292
- }
293
-
294
- // Found non editable node
295
- if (getContentEditable(node) === "false") {
296
- removeNodeIfNotParent(node);
297
- return true;
298
- }
299
- }
300
-
301
- // Check if the content node is within a non editable parent
302
- if (getNonEditableParent(node)) {
303
- return true;
304
- }
305
-
306
- return false;
307
- }
308
-
309
- if (selection.isCollapsed()) {
310
- rng = selection.getRng(true);
311
- container = rng.startContainer;
312
- offset = rng.startOffset;
313
- container = getParentCaretContainer(container) || container;
314
-
315
- // Is in noneditable parent
316
- if (nonEditableParent = getNonEditableParent(container)) {
317
- removeNodeIfNotParent(nonEditableParent);
318
- return false;
319
- }
320
-
321
- // Check if the caret is in the middle of a text node
322
- if (container.nodeType == 3 && (backspace ? offset > 0 : offset < container.nodeValue.length)) {
323
- return true;
324
- }
325
-
326
- // Resolve container index
327
- if (container.nodeType == 1) {
328
- container = container.childNodes[offset] || container;
329
- }
330
-
331
- // Check if previous or next tree node is non editable then block the event
332
- if (isNextPrevTreeNodeNonEditable()) {
333
- return false;
334
- }
335
- }
336
-
337
- return true;
338
- }
339
-
340
- startElement = selection.getStart()
341
- endElement = selection.getEnd();
342
-
343
- // Disable all key presses in contentEditable=false except delete or backspace
344
- nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement);
345
- if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) {
346
- // Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior
347
- if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) {
348
- return;
349
- }
350
-
351
- e.preventDefault();
352
-
353
- // Arrow left/right select the element and collapse left/right
354
- if (keyCode == VK.LEFT || keyCode == VK.RIGHT) {
355
- var left = keyCode == VK.LEFT;
356
- // If a block element find previous or next element to position the caret
357
- if (ed.dom.isBlock(nonEditableParent)) {
358
- var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling;
359
- var walker = new TreeWalker(targetElement, targetElement);
360
- var caretElement = left ? walker.prev() : walker.next();
361
- positionCaretOnElement(caretElement, !left);
362
- } else {
363
- positionCaretOnElement(nonEditableParent, left);
364
- }
365
- }
366
- } else {
367
- // Is arrow left/right, backspace or delete
368
- if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) {
369
- caretContainer = getParentCaretContainer(startElement);
370
- if (caretContainer) {
371
- // Arrow left or backspace
372
- if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) {
373
- nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true);
374
-
375
- if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
376
- e.preventDefault();
377
-
378
- if (keyCode == VK.LEFT) {
379
- positionCaretOnElement(nonEditableParent, true);
380
- } else {
381
- dom.remove(nonEditableParent);
382
- return;
383
- }
384
- } else {
385
- removeCaretContainer(caretContainer);
386
- }
387
- }
388
-
389
- // Arrow right or delete
390
- if (keyCode == VK.RIGHT || keyCode == VK.DELETE) {
391
- nonEditableParent = getNonEmptyTextNodeSibling(caretContainer);
392
-
393
- if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
394
- e.preventDefault();
395
-
396
- if (keyCode == VK.RIGHT) {
397
- positionCaretOnElement(nonEditableParent, false);
398
- } else {
399
- dom.remove(nonEditableParent);
400
- return;
401
- }
402
- } else {
403
- removeCaretContainer(caretContainer);
404
- }
405
- }
406
- }
407
-
408
- if ((keyCode == VK.BACKSPACE || keyCode == VK.DELETE) && !canDelete(keyCode == VK.BACKSPACE)) {
409
- e.preventDefault();
410
- return false;
411
- }
412
- }
413
- }
414
- };
415
-
416
- ed.onMouseDown.addToTop(function(ed, e) {
417
- var node = ed.selection.getNode();
418
-
419
- if (getContentEditable(node) === "false" && node == e.target) {
420
- // Expand selection on mouse down we can't block the default event since it's used for drag/drop
421
- moveSelection();
422
- }
423
- });
424
-
425
- ed.onMouseUp.addToTop(moveSelection);
426
- ed.onKeyDown.addToTop(handleKey);
427
- ed.onKeyUp.addToTop(moveSelection);
428
- };
429
-
430
- tinymce.create('tinymce.plugins.NonEditablePlugin', {
431
- init : function(ed, url) {
432
- var editClass, nonEditClass, nonEditableRegExps;
433
-
434
- // Converts configured regexps to noneditable span items
435
- function convertRegExpsToNonEditable(ed, args) {
436
- var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass);
437
-
438
- // Don't replace the variables when raw is used for example on undo/redo
439
- if (args.format == "raw") {
440
- return;
441
- }
442
-
443
- while (i--) {
444
- content = content.replace(nonEditableRegExps[i], function(match) {
445
- var args = arguments, index = args[args.length - 2];
446
-
447
- // Is value inside an attribute then don't replace
448
- if (index > 0 && content.charAt(index - 1) == '"') {
449
- return match;
450
- }
451
-
452
- return '<span class="' + cls + '" data-mce-content="' + ed.dom.encode(args[0]) + '">' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + '</span>';
453
- });
454
- }
455
-
456
- args.content = content;
457
- };
458
-
459
- editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " ";
460
- nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " ";
461
-
462
- // Setup noneditable regexps array
463
- nonEditableRegExps = ed.getParam("noneditable_regexp");
464
- if (nonEditableRegExps && !nonEditableRegExps.length) {
465
- nonEditableRegExps = [nonEditableRegExps];
466
- }
467
-
468
- ed.onPreInit.add(function() {
469
- handleContentEditableSelection(ed);
470
-
471
- if (nonEditableRegExps) {
472
- ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable);
473
- ed.onBeforeSetContent.add(convertRegExpsToNonEditable);
474
- }
475
-
476
- // Apply contentEditable true/false on elements with the noneditable/editable classes
477
- ed.parser.addAttributeFilter('class', function(nodes) {
478
- var i = nodes.length, className, node;
479
-
480
- while (i--) {
481
- node = nodes[i];
482
- className = " " + node.attr("class") + " ";
483
-
484
- if (className.indexOf(editClass) !== -1) {
485
- node.attr(internalName, "true");
486
- } else if (className.indexOf(nonEditClass) !== -1) {
487
- node.attr(internalName, "false");
488
- }
489
- }
490
- });
491
-
492
- // Remove internal name
493
- ed.serializer.addAttributeFilter(internalName, function(nodes, name) {
494
- var i = nodes.length, node;
495
-
496
- while (i--) {
497
- node = nodes[i];
498
-
499
- if (nonEditableRegExps && node.attr('data-mce-content')) {
500
- node.name = "#text";
501
- node.type = 3;
502
- node.raw = true;
503
- node.value = node.attr('data-mce-content');
504
- } else {
505
- node.attr(externalName, null);
506
- node.attr(internalName, null);
507
- }
508
- }
509
- });
510
-
511
- // Convert external name into internal name
512
- ed.parser.addAttributeFilter(externalName, function(nodes, name) {
513
- var i = nodes.length, node;
514
-
515
- while (i--) {
516
- node = nodes[i];
517
- node.attr(internalName, node.attr(externalName));
518
- node.attr(externalName, null);
519
- }
520
- });
521
- });
522
- },
523
-
524
- getInfo : function() {
525
- return {
526
- longname : 'Non editable elements',
527
- author : 'Moxiecode Systems AB',
528
- authorurl : 'http://tinymce.moxiecode.com',
529
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
530
- version : tinymce.majorVersion + "." + tinymce.minorVersion
531
- };
532
- }
533
- });
534
-
535
- // Register plugin
536
- tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin);
537
- })();