lolita 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. data/GUIDELINE +5 -0
  2. data/Gemfile +18 -13
  3. data/VERSION +1 -1
  4. data/app/controllers/lolita/rest_controller.rb +4 -1
  5. data/app/helpers/lolita_helper.rb +10 -1
  6. data/app/views/components/lolita/list/_new_resource.html.erb +1 -1
  7. data/app/views/components/lolita/list/_tool_cell.html.erb +3 -3
  8. data/app/views/components/lolita/shared/_flash.html.erb +13 -0
  9. data/app/views/components/lolita/shared/_right_sidebar.html.erb +14 -0
  10. data/app/views/components/lolita/tab/_default.html.erb +1 -0
  11. data/app/views/components/lolita/tabs/_display.html.erb +4 -19
  12. data/app/views/lolita/layouts/application.html.erb +1 -1
  13. data/app/views/lolita/layouts/application.html.erb_spec.rb +0 -0
  14. data/config/locales/en.yml +2 -0
  15. data/features/create_page.feature +20 -0
  16. data/features/step_definitions/lolita_steps.rb +7 -0
  17. data/features/step_definitions/web_steps.rb +219 -0
  18. data/features/support/env.rb +73 -0
  19. data/features/support/paths.rb +35 -0
  20. data/lib/lolita.rb +5 -3
  21. data/lib/lolita/adapter/abstract_adapter.rb +1 -0
  22. data/lib/lolita/adapter/active_record.rb +4 -0
  23. data/lib/lolita/adapter/mongoid.rb +4 -0
  24. data/lib/lolita/base_configuration.rb +50 -12
  25. data/lib/lolita/configuration/tab.rb +7 -6
  26. data/lib/lolita/configuration/tabs.rb +9 -0
  27. data/lib/lolita/mapping.rb +4 -1
  28. data/lib/lolita/modules.rb +3 -17
  29. data/lib/lolita/rails/all.rb +3 -0
  30. data/lib/lolita/rails/routes.rb +9 -5
  31. data/lib/lolita/test/matchers.rb +77 -0
  32. data/lolita.gemspec +86 -215
  33. data/public/images/lolita/plus.png +0 -0
  34. data/public/javascripts/lolita/tab.js +40 -37
  35. data/public/javascripts/tinymce/langs/en.js +221 -221
  36. data/public/javascripts/tinymce/license.txt +504 -504
  37. data/public/javascripts/tinymce/themes/advanced/about.htm +52 -52
  38. data/public/javascripts/tinymce/themes/advanced/anchor.htm +26 -26
  39. data/public/javascripts/tinymce/themes/advanced/charmap.htm +51 -51
  40. data/public/javascripts/tinymce/themes/advanced/color_picker.htm +74 -74
  41. data/public/javascripts/tinymce/themes/advanced/editor_template_src.js +1328 -1328
  42. data/public/javascripts/tinymce/themes/advanced/image.htm +80 -80
  43. data/public/javascripts/tinymce/themes/advanced/js/about.js +73 -73
  44. data/public/javascripts/tinymce/themes/advanced/js/anchor.js +42 -42
  45. data/public/javascripts/tinymce/themes/advanced/js/charmap.js +354 -354
  46. data/public/javascripts/tinymce/themes/advanced/js/color_picker.js +329 -329
  47. data/public/javascripts/tinymce/themes/advanced/js/image.js +247 -247
  48. data/public/javascripts/tinymce/themes/advanced/js/link.js +153 -153
  49. data/public/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -56
  50. data/public/javascripts/tinymce/themes/advanced/langs/en.js +68 -68
  51. data/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +53 -53
  52. data/public/javascripts/tinymce/themes/advanced/link.htm +57 -57
  53. data/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -47
  54. data/public/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -66
  55. data/public/javascripts/tinymce/themes/advanced/skins/cirkuit/dialog.css +117 -117
  56. data/public/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -988
  57. data/public/javascripts/tinymce/themes/advanced/source_editor.htm +25 -25
  58. data/public/stylesheets/lolita/style.css +30 -2
  59. data/spec/configuration/tab_spec.rb +42 -0
  60. data/spec/configuration/tabs_spec.rb +12 -0
  61. data/spec/lolita_spec.rb +1 -1
  62. data/spec/rails_app/app/mongoid/post.rb +3 -2
  63. data/spec/rails_app/config/application.rb +13 -13
  64. data/spec/rails_app/public/images/lolita/plus.png +0 -0
  65. data/spec/rails_app/public/javascripts/jquery-1.5.1.min.js +16 -0
  66. data/spec/rails_app/public/javascripts/lolita/main.js +6 -0
  67. data/spec/rails_app/public/javascripts/lolita/tab.js +41 -0
  68. data/spec/rails_app/public/javascripts/modernizr-1.7.min.js +2 -0
  69. data/spec/rails_app/public/javascripts/rails.js +137 -0
  70. data/spec/rails_app/public/javascripts/tinymce/jquery.tinymce.js +1 -0
  71. data/spec/rails_app/public/javascripts/tinymce/langs/en.js +222 -0
  72. data/spec/rails_app/public/javascripts/tinymce/license.txt +504 -0
  73. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/about.htm +52 -0
  74. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/anchor.htm +26 -0
  75. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/charmap.htm +51 -0
  76. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/color_picker.htm +74 -0
  77. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/editor_template.js +1 -0
  78. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/editor_template_src.js +1328 -0
  79. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/image.htm +80 -0
  80. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
  81. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
  82. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
  83. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
  84. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
  85. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
  86. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
  87. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
  88. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/trans.gif +0 -0
  89. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
  90. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
  91. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/about.js +73 -0
  92. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/anchor.js +42 -0
  93. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/charmap.js +354 -0
  94. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/color_picker.js +329 -0
  95. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/image.js +247 -0
  96. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/link.js +153 -0
  97. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -0
  98. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en.js +68 -0
  99. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/langs/en_dlg.js +54 -0
  100. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/link.htm +57 -0
  101. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -0
  102. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/content.css +66 -0
  103. data/{public/javascripts/tinymce/themes/advanced/skins/default → spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit}/dialog.css +117 -117
  104. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/butt2.png +0 -0
  105. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/button-bg.png +0 -0
  106. data/{public/javascripts/tinymce/themes/advanced/skins/default → spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit}/img/buttons.png +0 -0
  107. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/down_arrow.gif +0 -0
  108. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/fade-butt.png +0 -0
  109. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/icons.png +0 -0
  110. data/{public/javascripts/tinymce/themes/advanced/skins/default → spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit}/img/items.gif +0 -0
  111. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/menu-arrow.png +0 -0
  112. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/menu-check.png +0 -0
  113. data/{public/javascripts/tinymce/themes/advanced/skins/default → spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit}/img/progress.gif +0 -0
  114. data/{public/javascripts/tinymce/themes/advanced/skins/default → spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit}/img/tabs.gif +0 -0
  115. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/img/toolbarbg.png +0 -0
  116. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/skins/cirkuit/ui.css +988 -0
  117. data/spec/rails_app/public/javascripts/tinymce/themes/advanced/source_editor.htm +25 -0
  118. data/spec/rails_app/public/javascripts/tinymce/tiny_mce.js +1 -0
  119. data/spec/rails_app/public/javascripts/tinymce/tiny_mce_popup.js +5 -0
  120. data/spec/rails_app/public/stylesheets/lolita/default.css +169 -0
  121. data/spec/rails_app/public/stylesheets/lolita/style.css +214 -0
  122. metadata +138 -227
  123. data/public/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
  124. data/public/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
  125. data/public/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
  126. data/public/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
  127. data/public/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -7
  128. data/public/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
  129. data/public/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
  130. data/public/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
  131. data/public/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
  132. data/public/javascripts/tinymce/plugins/advimage/image.htm +0 -235
  133. data/public/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
  134. data/public/javascripts/tinymce/plugins/advimage/js/image.js +0 -445
  135. data/public/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -45
  136. data/public/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
  137. data/public/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
  138. data/public/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
  139. data/public/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -525
  140. data/public/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -54
  141. data/public/javascripts/tinymce/plugins/advlink/link.htm +0 -338
  142. data/public/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
  143. data/public/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -154
  144. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
  145. data/public/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
  146. data/public/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
  147. data/public/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -431
  148. data/public/javascripts/tinymce/plugins/autosave/langs/en.js +0 -4
  149. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
  150. data/public/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
  151. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
  152. data/public/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -154
  153. data/public/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
  154. data/public/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -82
  155. data/public/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
  156. data/public/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
  157. data/public/javascripts/tinymce/plugins/emotions/emotions.htm +0 -41
  158. data/public/javascripts/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
  159. data/public/javascripts/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
  160. data/public/javascripts/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  161. data/public/javascripts/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  162. data/public/javascripts/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
  163. data/public/javascripts/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
  164. data/public/javascripts/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
  165. data/public/javascripts/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
  166. data/public/javascripts/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  167. data/public/javascripts/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
  168. data/public/javascripts/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
  169. data/public/javascripts/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
  170. data/public/javascripts/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  171. data/public/javascripts/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
  172. data/public/javascripts/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
  173. data/public/javascripts/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
  174. data/public/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -22
  175. data/public/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -20
  176. data/public/javascripts/tinymce/plugins/example/dialog.htm +0 -22
  177. data/public/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
  178. data/public/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
  179. data/public/javascripts/tinymce/plugins/example/img/example.gif +0 -0
  180. data/public/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
  181. data/public/javascripts/tinymce/plugins/example/langs/en.js +0 -3
  182. data/public/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
  183. data/public/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -182
  184. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
  185. data/public/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -166
  186. data/public/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -571
  187. data/public/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -492
  188. data/public/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -85
  189. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
  190. data/public/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -159
  191. data/public/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -109
  192. data/public/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
  193. data/public/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
  194. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
  195. data/public/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -696
  196. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  197. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  198. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  199. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  200. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  201. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  202. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  203. data/public/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
  204. data/public/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
  205. data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
  206. data/public/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
  207. data/public/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
  208. data/public/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -214
  209. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
  210. data/public/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
  211. data/public/javascripts/tinymce/plugins/media/css/media.css +0 -17
  212. data/public/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
  213. data/public/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -770
  214. data/public/javascripts/tinymce/plugins/media/js/embed.js +0 -73
  215. data/public/javascripts/tinymce/plugins/media/js/media.js +0 -340
  216. data/public/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -109
  217. data/public/javascripts/tinymce/plugins/media/media.htm +0 -812
  218. data/public/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
  219. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
  220. data/public/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -53
  221. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
  222. data/public/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -90
  223. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
  224. data/public/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
  225. data/public/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
  226. data/public/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -899
  227. data/public/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
  228. data/public/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
  229. data/public/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -5
  230. data/public/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
  231. data/public/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
  232. data/public/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
  233. data/public/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
  234. data/public/javascripts/tinymce/plugins/preview/example.html +0 -28
  235. data/public/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
  236. data/public/javascripts/tinymce/plugins/preview/preview.html +0 -17
  237. data/public/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
  238. data/public/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
  239. data/public/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
  240. data/public/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
  241. data/public/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
  242. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
  243. data/public/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
  244. data/public/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -140
  245. data/public/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -16
  246. data/public/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
  247. data/public/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
  248. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
  249. data/public/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -415
  250. data/public/javascripts/tinymce/plugins/spellchecker/img/wline.gif +0 -0
  251. data/public/javascripts/tinymce/plugins/style/css/props.css +0 -13
  252. data/public/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
  253. data/public/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -55
  254. data/public/javascripts/tinymce/plugins/style/js/props.js +0 -635
  255. data/public/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -70
  256. data/public/javascripts/tinymce/plugins/style/props.htm +0 -838
  257. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
  258. data/public/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -114
  259. data/public/javascripts/tinymce/plugins/table/cell.htm +0 -178
  260. data/public/javascripts/tinymce/plugins/table/css/cell.css +0 -17
  261. data/public/javascripts/tinymce/plugins/table/css/row.css +0 -25
  262. data/public/javascripts/tinymce/plugins/table/css/table.css +0 -13
  263. data/public/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
  264. data/public/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1183
  265. data/public/javascripts/tinymce/plugins/table/js/cell.js +0 -284
  266. data/public/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
  267. data/public/javascripts/tinymce/plugins/table/js/row.js +0 -232
  268. data/public/javascripts/tinymce/plugins/table/js/table.js +0 -450
  269. data/public/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -74
  270. data/public/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
  271. data/public/javascripts/tinymce/plugins/table/row.htm +0 -157
  272. data/public/javascripts/tinymce/plugins/table/table.htm +0 -188
  273. data/public/javascripts/tinymce/plugins/template/blank.htm +0 -12
  274. data/public/javascripts/tinymce/plugins/template/css/template.css +0 -23
  275. data/public/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
  276. data/public/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
  277. data/public/javascripts/tinymce/plugins/template/js/template.js +0 -106
  278. data/public/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -15
  279. data/public/javascripts/tinymce/plugins/template/template.htm +0 -31
  280. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
  281. data/public/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
  282. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
  283. data/public/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -114
  284. data/public/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
  285. data/public/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
  286. data/public/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
  287. data/public/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
  288. data/public/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
  289. data/public/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
  290. data/public/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
  291. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
  292. data/public/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
  293. data/public/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
  294. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
  295. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
  296. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -125
  297. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
  298. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
  299. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
  300. data/public/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
  301. data/public/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -32
  302. data/public/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -47
  303. data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  304. data/public/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  305. data/public/javascripts/tinymce/themes/advanced/skins/default/ui.css +0 -213
  306. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -23
  307. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -105
  308. data/public/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -101
  309. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -46
  310. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -116
  311. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  312. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  313. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  314. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +0 -215
  315. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
  316. data/public/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
  317. data/public/javascripts/tinymce/themes/simple/editor_template.js +0 -1
  318. data/public/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
  319. data/public/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
  320. data/public/javascripts/tinymce/themes/simple/langs/en.js +0 -11
  321. data/public/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
  322. data/public/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
  323. data/public/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
  324. data/public/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  325. data/public/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +0 -35
  326. data/public/javascripts/tinymce/tiny_mce_src.js +0 -14724
  327. data/public/javascripts/tinymce/utils/editable_selects.js +0 -70
  328. data/public/javascripts/tinymce/utils/form_utils.js +0 -207
  329. data/public/javascripts/tinymce/utils/mctabs.js +0 -162
  330. data/public/javascripts/tinymce/utils/validate.js +0 -252
@@ -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(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},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,53 +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 (tinymce.isIE && e.keyCode == 9) {
29
- ed.execCommand('mceNonBreaking');
30
- ed.execCommand('mceNonBreaking');
31
- ed.execCommand('mceNonBreaking');
32
- tinymce.dom.Event.cancel(e);
33
- }
34
- });
35
- }
36
- },
37
-
38
- getInfo : function() {
39
- return {
40
- longname : 'Nonbreaking space',
41
- author : 'Moxiecode Systems AB',
42
- authorurl : 'http://tinymce.moxiecode.com',
43
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
44
- version : tinymce.majorVersion + "." + tinymce.minorVersion
45
- };
46
- }
47
-
48
- // Private methods
49
- });
50
-
51
- // Register plugin
52
- tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
53
- })();
@@ -1 +0,0 @@
1
- (function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},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}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})();
@@ -1,90 +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 Event = tinymce.dom.Event;
13
-
14
- tinymce.create('tinymce.plugins.NonEditablePlugin', {
15
- init : function(ed, url) {
16
- var t = this, editClass, nonEditClass;
17
-
18
- t.editor = ed;
19
- editClass = ed.getParam("noneditable_editable_class", "mceEditable");
20
- nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable");
21
-
22
- ed.onNodeChange.addToTop(function(ed, cm, n) {
23
- var sc, ec;
24
-
25
- // Block if start or end is inside a non editable element
26
- sc = ed.dom.getParent(ed.selection.getStart(), function(n) {
27
- return ed.dom.hasClass(n, nonEditClass);
28
- });
29
-
30
- ec = ed.dom.getParent(ed.selection.getEnd(), function(n) {
31
- return ed.dom.hasClass(n, nonEditClass);
32
- });
33
-
34
- // Block or unblock
35
- if (sc || ec) {
36
- t._setDisabled(1);
37
- return false;
38
- } else
39
- t._setDisabled(0);
40
- });
41
- },
42
-
43
- getInfo : function() {
44
- return {
45
- longname : 'Non editable elements',
46
- author : 'Moxiecode Systems AB',
47
- authorurl : 'http://tinymce.moxiecode.com',
48
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
49
- version : tinymce.majorVersion + "." + tinymce.minorVersion
50
- };
51
- },
52
-
53
- _block : function(ed, e) {
54
- var k = e.keyCode;
55
-
56
- // Don't block arrow keys, pg up/down, and F1-F12
57
- if ((k > 32 && k < 41) || (k > 111 && k < 124))
58
- return;
59
-
60
- return Event.cancel(e);
61
- },
62
-
63
- _setDisabled : function(s) {
64
- var t = this, ed = t.editor;
65
-
66
- tinymce.each(ed.controlManager.controls, function(c) {
67
- c.setDisabled(s);
68
- });
69
-
70
- if (s !== t.disabled) {
71
- if (s) {
72
- ed.onKeyDown.addToTop(t._block);
73
- ed.onKeyPress.addToTop(t._block);
74
- ed.onKeyUp.addToTop(t._block);
75
- ed.onPaste.addToTop(t._block);
76
- } else {
77
- ed.onKeyDown.remove(t._block);
78
- ed.onKeyPress.remove(t._block);
79
- ed.onKeyUp.remove(t._block);
80
- ed.onPaste.remove(t._block);
81
- }
82
-
83
- t.disabled = s;
84
- }
85
- }
86
- });
87
-
88
- // Register plugin
89
- tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin);
90
- })();
@@ -1 +0,0 @@
1
- (function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img src="'+b.theme.url+'/img/trans.gif" class="mcePageBreak mceItemNoResize" />',a="mcePageBreak",c=b.getParam("pagebreak_separator","<!-- pagebreak -->"),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})();
@@ -1,74 +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.PageBreakPlugin', {
13
- init : function(ed, url) {
14
- var pb = '<img src="' + ed.theme.url + '/img/trans.gif" class="mcePageBreak mceItemNoResize" />', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', '<!-- pagebreak -->'), pbRE;
15
-
16
- pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g');
17
-
18
- // Register commands
19
- ed.addCommand('mcePageBreak', function() {
20
- ed.execCommand('mceInsertContent', 0, pb);
21
- });
22
-
23
- // Register buttons
24
- ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls});
25
-
26
- ed.onInit.add(function() {
27
- if (ed.theme.onResolveName) {
28
- ed.theme.onResolveName.add(function(th, o) {
29
- if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls))
30
- o.name = 'pagebreak';
31
- });
32
- }
33
- });
34
-
35
- ed.onClick.add(function(ed, e) {
36
- e = e.target;
37
-
38
- if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls))
39
- ed.selection.select(e);
40
- });
41
-
42
- ed.onNodeChange.add(function(ed, cm, n) {
43
- cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls));
44
- });
45
-
46
- ed.onBeforeSetContent.add(function(ed, o) {
47
- o.content = o.content.replace(pbRE, pb);
48
- });
49
-
50
- ed.onPostProcess.add(function(ed, o) {
51
- if (o.get)
52
- o.content = o.content.replace(/<img[^>]+>/g, function(im) {
53
- if (im.indexOf('class="mcePageBreak') !== -1)
54
- im = sep;
55
-
56
- return im;
57
- });
58
- });
59
- },
60
-
61
- getInfo : function() {
62
- return {
63
- longname : 'PageBreak',
64
- author : 'Moxiecode Systems AB',
65
- authorurl : 'http://tinymce.moxiecode.com',
66
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',
67
- version : tinymce.majorVersion + "." + tinymce.minorVersion
68
- };
69
- }
70
- });
71
-
72
- // Register plugin
73
- tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin);
74
- })();
@@ -1 +0,0 @@
1
- (function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.pasteAsPlainText=false;function h(m,k){var l=d.dom,i,j;f.onPreProcess.dispatch(f,m);m.node=l.create("div",0,m.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){j=l.select("p,h1,h2,h3,h4,h5,h6,pre",m.node);if(j.length==1){l.remove(j.reverse(),true)}}}f.onPostProcess.dispatch(f,m);m.content=d.serializer.serialize(m.node,{getInner:1});if((!k)&&(d.pasteAsPlainText)){f._insertPlainText(d,l,m.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(m.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:r.replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},'\uFEFF<br data-mce-bogus="1">');if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort().y}o.setStyles(l,{position:"absolute",left:-10000,top:i,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}h({content:l.innerHTML});return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,1);k.setRng(j);window.setTimeout(function(){var t="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(v){var u=v.firstChild;if(u&&u.nodeName=="DIV"&&u.style.marginTop&&u.style.backgroundColor){o.remove(u,1)}c(o.select("span.Apple-style-span",v),function(w){o.remove(w,1)});c(o.select("br[data-mce-bogus]",v),function(w){o.remove(w)});if(v.parentNode.className!="mcePaste"){t+=v.innerHTML}})}else{t="<pre>"+o.encode(r).replace(/\r?\n/g,"<br />")+"</pre>"}c(o.select("div.mcePaste"),function(u){o.remove(u)});if(p){k.setRng(p)}h({content:t});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.add(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}if(b(d,"paste_block_drop")){d.onInit.add(function(){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})})}f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*(&nbsp;)+/gi,/(&nbsp;|<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/&quot;/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/&nbsp;/g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){i.remove(v)}else{if(/^[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*(&nbsp;|\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j,x,v){var t,u,l,k,r,e,p,f,n=j.getWin(),z=j.getDoc(),s=j.selection,m=tinymce.is,y=tinymce.inArray,g=b(j,"paste_text_linebreaktype"),o=b(j,"paste_text_replacements");function q(d){c(d,function(h){if(h.constructor==RegExp){v=v.replace(h,"")}else{v=v.replace(h[0],h[1])}})}if((typeof(v)==="string")&&(v.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/&nbsp;/gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.decode(tinymce.html.Entities.encodeRaw(v));if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"<br />"]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"</p><p>"],[/\n/g,"<br />"]])}}if((l=v.indexOf("</p><p>"))!=-1){k=v.lastIndexOf("</p><p>");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t<u;t++){p+="</"+e[t].nodeName.toLowerCase()+">";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+'<span id="_plain_text_marker">&nbsp;</span>');window.setTimeout(function(){var d=x.get("_plain_text_marker"),A,h,w,i;s.select(d,false);z.execCommand("Delete",false,null);d=null;A=s.getStart();h=x.getViewPort(n);w=x.getPos(A).y;i=A.clientHeight;if((w<h.y)||(w+i>h.y+h.h)){z.body.scrollTop=w<h.y?w:w-h.h+25}},0)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
@@ -1,899 +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 each = tinymce.each,
13
- defs = {
14
- paste_auto_cleanup_on_paste : true,
15
- paste_block_drop : false,
16
- paste_retain_style_properties : "none",
17
- paste_strip_class_attributes : "mso",
18
- paste_remove_spans : false,
19
- paste_remove_styles : false,
20
- paste_remove_styles_if_webkit : true,
21
- paste_convert_middot_lists : true,
22
- paste_convert_headers_to_strong : false,
23
- paste_dialog_width : "450",
24
- paste_dialog_height : "400",
25
- paste_text_use_dialog : false,
26
- paste_text_sticky : false,
27
- paste_text_notifyalways : false,
28
- paste_text_linebreaktype : "p",
29
- paste_text_replacements : [
30
- [/\u2026/g, "..."],
31
- [/[\x93\x94\u201c\u201d]/g, '"'],
32
- [/[\x60\x91\x92\u2018\u2019]/g, "'"]
33
- ]
34
- };
35
-
36
- function getParam(ed, name) {
37
- return ed.getParam(name, defs[name]);
38
- }
39
-
40
- tinymce.create('tinymce.plugins.PastePlugin', {
41
- init : function(ed, url) {
42
- var t = this;
43
-
44
- t.editor = ed;
45
- t.url = url;
46
-
47
- // Setup plugin events
48
- t.onPreProcess = new tinymce.util.Dispatcher(t);
49
- t.onPostProcess = new tinymce.util.Dispatcher(t);
50
-
51
- // Register default handlers
52
- t.onPreProcess.add(t._preProcess);
53
- t.onPostProcess.add(t._postProcess);
54
-
55
- // Register optional preprocess handler
56
- t.onPreProcess.add(function(pl, o) {
57
- ed.execCallback('paste_preprocess', pl, o);
58
- });
59
-
60
- // Register optional postprocess
61
- t.onPostProcess.add(function(pl, o) {
62
- ed.execCallback('paste_postprocess', pl, o);
63
- });
64
-
65
- // Initialize plain text flag
66
- ed.pasteAsPlainText = false;
67
-
68
- // This function executes the process handlers and inserts the contents
69
- // force_rich overrides plain text mode set by user, important for pasting with execCommand
70
- function process(o, force_rich) {
71
- var dom = ed.dom, rng, nodes;
72
-
73
- // Execute pre process handlers
74
- t.onPreProcess.dispatch(t, o);
75
-
76
- // Create DOM structure
77
- o.node = dom.create('div', 0, o.content);
78
-
79
- // If pasting inside the same element and the contents is only one block
80
- // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
81
- if (tinymce.isGecko) {
82
- rng = ed.selection.getRng(true);
83
- if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
84
- nodes = dom.select('p,h1,h2,h3,h4,h5,h6,pre', o.node);
85
-
86
- if (nodes.length == 1)
87
- dom.remove(nodes.reverse(), true);
88
- }
89
- }
90
-
91
- // Execute post process handlers
92
- t.onPostProcess.dispatch(t, o);
93
-
94
- // Serialize content
95
- o.content = ed.serializer.serialize(o.node, {getInner : 1});
96
-
97
- // Plain text option active?
98
- if ((!force_rich) && (ed.pasteAsPlainText)) {
99
- t._insertPlainText(ed, dom, o.content);
100
-
101
- if (!getParam(ed, "paste_text_sticky")) {
102
- ed.pasteAsPlainText = false;
103
- ed.controlManager.setActive("pastetext", false);
104
- }
105
- } else {
106
- t._insert(o.content);
107
- }
108
- }
109
-
110
- // Add command for external usage
111
- ed.addCommand('mceInsertClipboardContent', function(u, o) {
112
- process(o, true);
113
- });
114
-
115
- if (!getParam(ed, "paste_text_use_dialog")) {
116
- ed.addCommand('mcePasteText', function(u, v) {
117
- var cookie = tinymce.util.Cookie;
118
-
119
- ed.pasteAsPlainText = !ed.pasteAsPlainText;
120
- ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
121
-
122
- if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
123
- if (getParam(ed, "paste_text_sticky")) {
124
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
125
- } else {
126
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
127
- }
128
-
129
- if (!getParam(ed, "paste_text_notifyalways")) {
130
- cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
131
- }
132
- }
133
- });
134
- }
135
-
136
- ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
137
- ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
138
-
139
- // This function grabs the contents from the clipboard by adding a
140
- // hidden div and placing the caret inside it and after the browser paste
141
- // is done it grabs that contents and processes that
142
- function grabContent(e) {
143
- var n, or, rng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
144
-
145
- // Check if browser supports direct plaintext access
146
- if (e.clipboardData || dom.doc.dataTransfer) {
147
- textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
148
-
149
- if (ed.pasteAsPlainText) {
150
- e.preventDefault();
151
- process({content : textContent.replace(/\r?\n/g, '<br />')});
152
- return;
153
- }
154
- }
155
-
156
- if (dom.get('_mcePaste'))
157
- return;
158
-
159
- // Create container to paste into
160
- n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF<br data-mce-bogus="1">');
161
-
162
- // If contentEditable mode we need to find out the position of the closest element
163
- if (body != ed.getDoc().body)
164
- posY = dom.getPos(ed.selection.getStart(), body).y;
165
- else
166
- posY = body.scrollTop + dom.getViewPort().y;
167
-
168
- // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
169
- dom.setStyles(n, {
170
- position : 'absolute',
171
- left : -10000,
172
- top : posY,
173
- width : 1,
174
- height : 1,
175
- overflow : 'hidden'
176
- });
177
-
178
- if (tinymce.isIE) {
179
- // Select the container
180
- rng = dom.doc.body.createTextRange();
181
- rng.moveToElementText(n);
182
- rng.execCommand('Paste');
183
-
184
- // Remove container
185
- dom.remove(n);
186
-
187
- // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
188
- // to IE security settings so we pass the junk though better than nothing right
189
- if (n.innerHTML === '\uFEFF') {
190
- ed.execCommand('mcePasteWord');
191
- e.preventDefault();
192
- return;
193
- }
194
-
195
- // Process contents
196
- process({content : n.innerHTML});
197
-
198
- // Block the real paste event
199
- return tinymce.dom.Event.cancel(e);
200
- } else {
201
- function block(e) {
202
- e.preventDefault();
203
- };
204
-
205
- // Block mousedown and click to prevent selection change
206
- dom.bind(ed.getDoc(), 'mousedown', block);
207
- dom.bind(ed.getDoc(), 'keydown', block);
208
-
209
- or = ed.selection.getRng();
210
-
211
- // Move caret into hidden div
212
- n = n.firstChild;
213
- rng = ed.getDoc().createRange();
214
- rng.setStart(n, 0);
215
- rng.setEnd(n, 1);
216
- sel.setRng(rng);
217
-
218
- // Wait a while and grab the pasted contents
219
- window.setTimeout(function() {
220
- var h = '', nl;
221
-
222
- // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
223
- if (!dom.select('div.mcePaste > div.mcePaste').length) {
224
- nl = dom.select('div.mcePaste');
225
-
226
- // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
227
- each(nl, function(n) {
228
- var child = n.firstChild;
229
-
230
- // WebKit inserts a DIV container with lots of odd styles
231
- if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
232
- dom.remove(child, 1);
233
- }
234
-
235
- // Remove apply style spans
236
- each(dom.select('span.Apple-style-span', n), function(n) {
237
- dom.remove(n, 1);
238
- });
239
-
240
- // Remove bogus br elements
241
- each(dom.select('br[data-mce-bogus]', n), function(n) {
242
- dom.remove(n);
243
- });
244
-
245
- // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
246
- if (n.parentNode.className != 'mcePaste')
247
- h += n.innerHTML;
248
- });
249
- } else {
250
- // Found WebKit weirdness so force the content into plain text mode
251
- h = '<pre>' + dom.encode(textContent).replace(/\r?\n/g, '<br />') + '</pre>';
252
- }
253
-
254
- // Remove the nodes
255
- each(dom.select('div.mcePaste'), function(n) {
256
- dom.remove(n);
257
- });
258
-
259
- // Restore the old selection
260
- if (or)
261
- sel.setRng(or);
262
-
263
- process({content : h});
264
-
265
- // Unblock events ones we got the contents
266
- dom.unbind(ed.getDoc(), 'mousedown', block);
267
- dom.unbind(ed.getDoc(), 'keydown', block);
268
- }, 0);
269
- }
270
- }
271
-
272
- // Check if we should use the new auto process method
273
- if (getParam(ed, "paste_auto_cleanup_on_paste")) {
274
- // Is it's Opera or older FF use key handler
275
- if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
276
- ed.onKeyDown.add(function(ed, e) {
277
- if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
278
- grabContent(e);
279
- });
280
- } else {
281
- // Grab contents on paste event on Gecko and WebKit
282
- ed.onPaste.addToTop(function(ed, e) {
283
- return grabContent(e);
284
- });
285
- }
286
- }
287
-
288
- // Block all drag/drop events
289
- if (getParam(ed, "paste_block_drop")) {
290
- ed.onInit.add(function() {
291
- ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
292
- e.preventDefault();
293
- e.stopPropagation();
294
-
295
- return false;
296
- });
297
- });
298
- }
299
-
300
- // Add legacy support
301
- t._legacySupport();
302
- },
303
-
304
- getInfo : function() {
305
- return {
306
- longname : 'Paste text/word',
307
- author : 'Moxiecode Systems AB',
308
- authorurl : 'http://tinymce.moxiecode.com',
309
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
310
- version : tinymce.majorVersion + "." + tinymce.minorVersion
311
- };
312
- },
313
-
314
- _preProcess : function(pl, o) {
315
- //console.log('Before preprocess:' + o.content);
316
-
317
- var ed = this.editor,
318
- h = o.content,
319
- grep = tinymce.grep,
320
- explode = tinymce.explode,
321
- trim = tinymce.trim,
322
- len, stripClass;
323
-
324
- function process(items) {
325
- each(items, function(v) {
326
- // Remove or replace
327
- if (v.constructor == RegExp)
328
- h = h.replace(v, '');
329
- else
330
- h = h.replace(v[0], v[1]);
331
- });
332
- }
333
-
334
- // Detect Word content and process it more aggressive
335
- if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
336
- o.wordContent = true; // Mark the pasted contents as word specific content
337
- //console.log('Word contents detected.');
338
-
339
- // Process away some basic content
340
- process([
341
- /^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
342
- /(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
343
- ]);
344
-
345
- if (getParam(ed, "paste_convert_headers_to_strong")) {
346
- h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
347
- }
348
-
349
- if (getParam(ed, "paste_convert_middot_lists")) {
350
- process([
351
- [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
352
- [/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
353
- [/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
354
- ]);
355
- }
356
-
357
- process([
358
- // Word comments like conditional comments etc
359
- /<!--[\s\S]+?-->/gi,
360
-
361
- // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
362
- /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
363
-
364
- // Convert <s> into <strike> for line-though
365
- [/<(\/?)s>/gi, "<$1strike>"],
366
-
367
- // Replace nsbp entites to char since it's easier to handle
368
- [/&nbsp;/gi, "\u00a0"]
369
- ]);
370
-
371
- // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
372
- // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
373
- do {
374
- len = h.length;
375
- h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
376
- } while (len != h.length);
377
-
378
- // Remove all spans if no styles is to be retained
379
- if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
380
- h = h.replace(/<\/?span[^>]*>/gi, "");
381
- } else {
382
- // We're keeping styles, so at least clean them up.
383
- // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
384
-
385
- process([
386
- // Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
387
- [/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
388
- function(str, spaces) {
389
- return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
390
- }
391
- ],
392
-
393
- // Examine all styles: delete junk, transform some, and keep the rest
394
- [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
395
- function(str, tag, style) {
396
- var n = [],
397
- i = 0,
398
- s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
399
-
400
- // Examine each style definition within the tag's style attribute
401
- each(s, function(v) {
402
- var name, value,
403
- parts = explode(v, ":");
404
-
405
- function ensureUnits(v) {
406
- return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
407
- }
408
-
409
- if (parts.length == 2) {
410
- name = parts[0].toLowerCase();
411
- value = parts[1].toLowerCase();
412
-
413
- // Translate certain MS Office styles into their CSS equivalents
414
- switch (name) {
415
- case "mso-padding-alt":
416
- case "mso-padding-top-alt":
417
- case "mso-padding-right-alt":
418
- case "mso-padding-bottom-alt":
419
- case "mso-padding-left-alt":
420
- case "mso-margin-alt":
421
- case "mso-margin-top-alt":
422
- case "mso-margin-right-alt":
423
- case "mso-margin-bottom-alt":
424
- case "mso-margin-left-alt":
425
- case "mso-table-layout-alt":
426
- case "mso-height":
427
- case "mso-width":
428
- case "mso-vertical-align-alt":
429
- n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
430
- return;
431
-
432
- case "horiz-align":
433
- n[i++] = "text-align:" + value;
434
- return;
435
-
436
- case "vert-align":
437
- n[i++] = "vertical-align:" + value;
438
- return;
439
-
440
- case "font-color":
441
- case "mso-foreground":
442
- n[i++] = "color:" + value;
443
- return;
444
-
445
- case "mso-background":
446
- case "mso-highlight":
447
- n[i++] = "background:" + value;
448
- return;
449
-
450
- case "mso-default-height":
451
- n[i++] = "min-height:" + ensureUnits(value);
452
- return;
453
-
454
- case "mso-default-width":
455
- n[i++] = "min-width:" + ensureUnits(value);
456
- return;
457
-
458
- case "mso-padding-between-alt":
459
- n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
460
- return;
461
-
462
- case "text-line-through":
463
- if ((value == "single") || (value == "double")) {
464
- n[i++] = "text-decoration:line-through";
465
- }
466
- return;
467
-
468
- case "mso-zero-height":
469
- if (value == "yes") {
470
- n[i++] = "display:none";
471
- }
472
- return;
473
- }
474
-
475
- // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
476
- if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
477
- return;
478
- }
479
-
480
- // If it reached this point, it must be a valid CSS style
481
- n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
482
- }
483
- });
484
-
485
- // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
486
- if (i > 0) {
487
- return tag + ' style="' + n.join(';') + '"';
488
- } else {
489
- return tag;
490
- }
491
- }
492
- ]
493
- ]);
494
- }
495
- }
496
-
497
- // Replace headers with <strong>
498
- if (getParam(ed, "paste_convert_headers_to_strong")) {
499
- process([
500
- [/<h[1-6][^>]*>/gi, "<p><strong>"],
501
- [/<\/h[1-6][^>]*>/gi, "</strong></p>"]
502
- ]);
503
- }
504
-
505
- process([
506
- // Copy paste from Java like Open Office will produce this junk on FF
507
- [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
508
- ]);
509
-
510
- // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
511
- // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
512
- stripClass = getParam(ed, "paste_strip_class_attributes");
513
-
514
- if (stripClass !== "none") {
515
- function removeClasses(match, g1) {
516
- if (stripClass === "all")
517
- return '';
518
-
519
- var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
520
- function(v) {
521
- return (/^(?!mso)/i.test(v));
522
- }
523
- );
524
-
525
- return cls.length ? ' class="' + cls.join(" ") + '"' : '';
526
- };
527
-
528
- h = h.replace(/ class="([^"]+)"/gi, removeClasses);
529
- h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
530
- }
531
-
532
- // Remove spans option
533
- if (getParam(ed, "paste_remove_spans")) {
534
- h = h.replace(/<\/?span[^>]*>/gi, "");
535
- }
536
-
537
- //console.log('After preprocess:' + h);
538
-
539
- o.content = h;
540
- },
541
-
542
- /**
543
- * Various post process items.
544
- */
545
- _postProcess : function(pl, o) {
546
- var t = this, ed = t.editor, dom = ed.dom, styleProps;
547
-
548
- if (o.wordContent) {
549
- // Remove named anchors or TOC links
550
- each(dom.select('a', o.node), function(a) {
551
- if (!a.href || a.href.indexOf('#_Toc') != -1)
552
- dom.remove(a, 1);
553
- });
554
-
555
- if (getParam(ed, "paste_convert_middot_lists")) {
556
- t._convertLists(pl, o);
557
- }
558
-
559
- // Process styles
560
- styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
561
-
562
- // Process only if a string was specified and not equal to "all" or "*"
563
- if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
564
- styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
565
-
566
- // Retains some style properties
567
- each(dom.select('*', o.node), function(el) {
568
- var newStyle = {}, npc = 0, i, sp, sv;
569
-
570
- // Store a subset of the existing styles
571
- if (styleProps) {
572
- for (i = 0; i < styleProps.length; i++) {
573
- sp = styleProps[i];
574
- sv = dom.getStyle(el, sp);
575
-
576
- if (sv) {
577
- newStyle[sp] = sv;
578
- npc++;
579
- }
580
- }
581
- }
582
-
583
- // Remove all of the existing styles
584
- dom.setAttrib(el, 'style', '');
585
-
586
- if (styleProps && npc > 0)
587
- dom.setStyles(el, newStyle); // Add back the stored subset of styles
588
- else // Remove empty span tags that do not have class attributes
589
- if (el.nodeName == 'SPAN' && !el.className)
590
- dom.remove(el, true);
591
- });
592
- }
593
- }
594
-
595
- // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
596
- if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
597
- each(dom.select('*[style]', o.node), function(el) {
598
- el.removeAttribute('style');
599
- el.removeAttribute('data-mce-style');
600
- });
601
- } else {
602
- if (tinymce.isWebKit) {
603
- // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
604
- // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
605
- each(dom.select('*', o.node), function(el) {
606
- el.removeAttribute('data-mce-style');
607
- });
608
- }
609
- }
610
- },
611
-
612
- /**
613
- * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
614
- */
615
- _convertLists : function(pl, o) {
616
- var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
617
-
618
- // Convert middot lists into real semantic lists
619
- each(dom.select('p', o.node), function(p) {
620
- var sib, val = '', type, html, idx, parents;
621
-
622
- // Get text node value at beginning of paragraph
623
- for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
624
- val += sib.nodeValue;
625
-
626
- val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
627
-
628
- // Detect unordered lists look for bullets
629
- if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val))
630
- type = 'ul';
631
-
632
- // Detect ordered lists 1., a. or ixv.
633
- if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
634
- type = 'ol';
635
-
636
- // Check if node value matches the list pattern: o&nbsp;&nbsp;
637
- if (type) {
638
- margin = parseFloat(p.style.marginLeft || 0);
639
-
640
- if (margin > lastMargin)
641
- levels.push(margin);
642
-
643
- if (!listElm || type != lastType) {
644
- listElm = dom.create(type);
645
- dom.insertAfter(listElm, p);
646
- } else {
647
- // Nested list element
648
- if (margin > lastMargin) {
649
- listElm = li.appendChild(dom.create(type));
650
- } else if (margin < lastMargin) {
651
- // Find parent level based on margin value
652
- idx = tinymce.inArray(levels, margin);
653
- parents = dom.getParents(listElm.parentNode, type);
654
- listElm = parents[parents.length - 1 - idx] || listElm;
655
- }
656
- }
657
-
658
- // Remove middot or number spans if they exists
659
- each(dom.select('span', p), function(span) {
660
- var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
661
-
662
- // Remove span with the middot or the number
663
- if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html))
664
- dom.remove(span);
665
- else if (/^[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
666
- dom.remove(span);
667
- });
668
-
669
- html = p.innerHTML;
670
-
671
- // Remove middot/list items
672
- if (type == 'ul')
673
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*(&nbsp;|\u00a0)+\s*/, '');
674
- else
675
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
676
-
677
- // Create li and add paragraph data into the new li
678
- li = listElm.appendChild(dom.create('li', 0, html));
679
- dom.remove(p);
680
-
681
- lastMargin = margin;
682
- lastType = type;
683
- } else
684
- listElm = lastMargin = 0; // End list element
685
- });
686
-
687
- // Remove any left over makers
688
- html = o.node.innerHTML;
689
- if (html.indexOf('__MCE_ITEM__') != -1)
690
- o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
691
- },
692
-
693
- /**
694
- * Inserts the specified contents at the caret position.
695
- */
696
- _insert : function(h, skip_undo) {
697
- var ed = this.editor, r = ed.selection.getRng();
698
-
699
- // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
700
- if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
701
- ed.getDoc().execCommand('Delete', false, null);
702
-
703
- // It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents
704
- ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
705
- },
706
-
707
- /**
708
- * Instead of the old plain text method which tried to re-create a paste operation, the
709
- * new approach adds a plain text mode toggle switch that changes the behavior of paste.
710
- * This function is passed the same input that the regular paste plugin produces.
711
- * It performs additional scrubbing and produces (and inserts) the plain text.
712
- * This approach leverages all of the great existing functionality in the paste
713
- * plugin, and requires minimal changes to add the new functionality.
714
- * Speednet - June 2009
715
- */
716
- _insertPlainText : function(ed, dom, h) {
717
- var i, len, pos, rpos, node, breakElms, before, after,
718
- w = ed.getWin(),
719
- d = ed.getDoc(),
720
- sel = ed.selection,
721
- is = tinymce.is,
722
- inArray = tinymce.inArray,
723
- linebr = getParam(ed, "paste_text_linebreaktype"),
724
- rl = getParam(ed, "paste_text_replacements");
725
-
726
- function process(items) {
727
- each(items, function(v) {
728
- if (v.constructor == RegExp)
729
- h = h.replace(v, "");
730
- else
731
- h = h.replace(v[0], v[1]);
732
- });
733
- };
734
-
735
- if ((typeof(h) === "string") && (h.length > 0)) {
736
- // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
737
- if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) {
738
- process([
739
- /[\n\r]+/g
740
- ]);
741
- } else {
742
- // Otherwise just get rid of carriage returns (only need linefeeds)
743
- process([
744
- /\r+/g
745
- ]);
746
- }
747
-
748
- process([
749
- [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
750
- [/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
751
- [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
752
- /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
753
- [/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
754
- [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars.
755
- [/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks
756
- /^\s+|\s+$/g // Trim the front & back
757
- ]);
758
-
759
- h = dom.decode(tinymce.html.Entities.encodeRaw(h));
760
-
761
- // Delete any highlighted text before pasting
762
- if (!sel.isCollapsed()) {
763
- d.execCommand("Delete", false, null);
764
- }
765
-
766
- // Perform default or custom replacements
767
- if (is(rl, "array") || (is(rl, "array"))) {
768
- process(rl);
769
- }
770
- else if (is(rl, "string")) {
771
- process(new RegExp(rl, "gi"));
772
- }
773
-
774
- // Treat paragraphs as specified in the config
775
- if (linebr == "none") {
776
- process([
777
- [/\n+/g, " "]
778
- ]);
779
- }
780
- else if (linebr == "br") {
781
- process([
782
- [/\n/g, "<br />"]
783
- ]);
784
- }
785
- else {
786
- process([
787
- /^\s+|\s+$/g,
788
- [/\n\n/g, "</p><p>"],
789
- [/\n/g, "<br />"]
790
- ]);
791
- }
792
-
793
- // This next piece of code handles the situation where we're pasting more than one paragraph of plain
794
- // text, and we are pasting the content into the middle of a block node in the editor. The block
795
- // node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining).
796
- // The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the
797
- // pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between
798
- // "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and
799
- // now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the
800
- // plain text take the same style as the existing paragraph.)
801
- if ((pos = h.indexOf("</p><p>")) != -1) {
802
- rpos = h.lastIndexOf("</p><p>");
803
- node = sel.getNode();
804
- breakElms = []; // Get list of elements to break
805
-
806
- do {
807
- if (node.nodeType == 1) {
808
- // Don't break tables and break at body
809
- if (node.nodeName == "TD" || node.nodeName == "BODY") {
810
- break;
811
- }
812
-
813
- breakElms[breakElms.length] = node;
814
- }
815
- } while (node = node.parentNode);
816
-
817
- // Are we in the middle of a block node?
818
- if (breakElms.length > 0) {
819
- before = h.substring(0, pos);
820
- after = "";
821
-
822
- for (i=0, len=breakElms.length; i<len; i++) {
823
- before += "</" + breakElms[i].nodeName.toLowerCase() + ">";
824
- after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">";
825
- }
826
-
827
- if (pos == rpos) {
828
- h = before + after + h.substring(pos+7);
829
- }
830
- else {
831
- h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7);
832
- }
833
- }
834
- }
835
-
836
- // Insert content at the caret, plus add a marker for repositioning the caret
837
- ed.execCommand("mceInsertRawHTML", false, h + '<span id="_plain_text_marker">&nbsp;</span>');
838
-
839
- // Reposition the caret to the marker, which was placed immediately after the inserted content.
840
- // Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers.
841
- // The second part of the code scrolls the content up if the caret is positioned off-screen.
842
- // This is only necessary for WebKit browsers, but it doesn't hurt to use for all.
843
- window.setTimeout(function() {
844
- var marker = dom.get('_plain_text_marker'),
845
- elm, vp, y, elmHeight;
846
-
847
- sel.select(marker, false);
848
- d.execCommand("Delete", false, null);
849
- marker = null;
850
-
851
- // Get element, position and height
852
- elm = sel.getStart();
853
- vp = dom.getViewPort(w);
854
- y = dom.getPos(elm).y;
855
- elmHeight = elm.clientHeight;
856
-
857
- // Is element within viewport if not then scroll it into view
858
- if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) {
859
- d.body.scrollTop = y < vp.y ? y : y - vp.h + 25;
860
- }
861
- }, 0);
862
- }
863
- },
864
-
865
- /**
866
- * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
867
- */
868
- _legacySupport : function() {
869
- var t = this, ed = t.editor;
870
-
871
- // Register command(s) for backwards compatibility
872
- ed.addCommand("mcePasteWord", function() {
873
- ed.windowManager.open({
874
- file: t.url + "/pasteword.htm",
875
- width: parseInt(getParam(ed, "paste_dialog_width")),
876
- height: parseInt(getParam(ed, "paste_dialog_height")),
877
- inline: 1
878
- });
879
- });
880
-
881
- if (getParam(ed, "paste_text_use_dialog")) {
882
- ed.addCommand("mcePasteText", function() {
883
- ed.windowManager.open({
884
- file : t.url + "/pastetext.htm",
885
- width: parseInt(getParam(ed, "paste_dialog_width")),
886
- height: parseInt(getParam(ed, "paste_dialog_height")),
887
- inline : 1
888
- });
889
- });
890
- }
891
-
892
- // Register button for backwards compatibility
893
- ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
894
- }
895
- });
896
-
897
- // Register plugin
898
- tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
899
- })();