kitsune 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. data/Rakefile +1 -1
  2. data/generators/kitsune/kitsune_generator.rb +14 -1
  3. data/generators/kitsune/templates/javascripts/tiny_mce/langs/en.js +154 -0
  4. data/generators/kitsune/templates/javascripts/tiny_mce/license.txt +504 -0
  5. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
  6. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
  7. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +54 -0
  8. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
  9. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
  10. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advhr/rule.htm +62 -0
  11. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
  12. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
  13. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +47 -0
  14. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/image.htm +237 -0
  15. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  16. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/js/image.js +443 -0
  17. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
  18. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
  19. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
  20. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +58 -0
  21. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
  22. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
  23. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/advlink/link.htm +338 -0
  24. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
  25. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +114 -0
  26. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
  27. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +51 -0
  28. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
  29. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +117 -0
  30. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
  31. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +95 -0
  32. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
  33. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +79 -0
  34. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
  35. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +40 -0
  36. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/emotions.htm +40 -0
  37. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  38. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  39. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  40. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  41. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  42. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  43. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  44. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  45. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  46. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  47. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  48. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  49. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  50. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  51. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  52. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  53. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
  54. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
  55. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/dialog.htm +27 -0
  56. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
  57. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +81 -0
  58. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
  59. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
  60. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
  61. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
  62. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
  63. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
  64. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +146 -0
  65. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +576 -0
  66. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +461 -0
  67. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
  68. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
  69. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +145 -0
  70. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
  71. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
  72. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +51 -0
  73. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
  74. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +632 -0
  75. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  76. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  77. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  78. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  79. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  80. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  81. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  82. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
  83. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
  84. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
  85. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +80 -0
  86. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
  87. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +209 -0
  88. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
  89. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
  90. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
  91. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +411 -0
  92. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
  93. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
  94. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
  95. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
  96. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
  97. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
  98. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
  99. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
  100. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
  101. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
  102. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/media/media.htm +822 -0
  103. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
  104. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +50 -0
  105. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
  106. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +87 -0
  107. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
  108. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
  109. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
  110. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
  111. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
  112. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
  113. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +531 -0
  114. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
  115. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
  116. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
  117. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/pastetext.htm +33 -0
  118. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/paste/pasteword.htm +27 -0
  119. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
  120. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +50 -0
  121. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/example.html +28 -0
  122. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
  123. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
  124. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
  125. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +31 -0
  126. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/safari/blank.htm +1 -0
  127. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/safari/editor_plugin.js +1 -0
  128. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +438 -0
  129. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
  130. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +98 -0
  131. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
  132. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
  133. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +54 -0
  134. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +126 -0
  135. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
  136. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +104 -0
  137. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
  138. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
  139. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +338 -0
  140. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  141. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
  142. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
  143. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +52 -0
  144. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
  145. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
  146. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/style/props.htm +730 -0
  147. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
  148. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +109 -0
  149. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/cell.htm +183 -0
  150. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
  151. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
  152. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
  153. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
  154. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1202 -0
  155. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/cell.js +269 -0
  156. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/merge_cells.js +29 -0
  157. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/row.js +212 -0
  158. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/js/table.js +440 -0
  159. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
  160. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/merge_cells.htm +37 -0
  161. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/row.htm +160 -0
  162. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/table/table.htm +192 -0
  163. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
  164. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
  165. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
  166. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +156 -0
  167. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
  168. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
  169. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/template/template.htm +38 -0
  170. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
  171. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +73 -0
  172. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
  173. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +95 -0
  174. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +148 -0
  175. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +148 -0
  176. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +153 -0
  177. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +148 -0
  178. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
  179. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
  180. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +169 -0
  181. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
  182. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +136 -0
  183. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +169 -0
  184. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +25 -0
  185. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +25 -0
  186. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +123 -0
  187. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +25 -0
  188. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +60 -0
  189. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
  190. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +59 -0
  191. data/generators/kitsune/templates/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
  192. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/about.htm +56 -0
  193. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/anchor.htm +31 -0
  194. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
  195. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/color_picker.htm +75 -0
  196. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
  197. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1153 -0
  198. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/image.htm +85 -0
  199. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  200. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  201. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/about.js +72 -0
  202. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
  203. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/charmap.js +325 -0
  204. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/color_picker.js +253 -0
  205. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/image.js +245 -0
  206. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
  207. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
  208. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -0
  209. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
  210. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/link.htm +63 -0
  211. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/content.css +32 -0
  212. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +116 -0
  213. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  214. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  215. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  216. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  217. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  218. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  219. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +214 -0
  220. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +32 -0
  221. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +115 -0
  222. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  223. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  224. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  225. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
  226. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
  227. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
  228. data/generators/kitsune/templates/javascripts/tiny_mce/themes/advanced/source_editor.htm +31 -0
  229. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
  230. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
  231. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  232. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
  233. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
  234. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
  235. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
  236. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  237. data/generators/kitsune/templates/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
  238. data/generators/kitsune/templates/javascripts/tiny_mce/tiny_mce.js +1 -0
  239. data/generators/kitsune/templates/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
  240. data/generators/kitsune/templates/javascripts/tiny_mce/tiny_mce_src.js +13231 -0
  241. data/generators/kitsune/templates/javascripts/tiny_mce/utils/editable_selects.js +69 -0
  242. data/generators/kitsune/templates/javascripts/tiny_mce/utils/form_utils.js +199 -0
  243. data/generators/kitsune/templates/javascripts/tiny_mce/utils/mctabs.js +76 -0
  244. data/generators/kitsune/templates/javascripts/tiny_mce/utils/validate.js +219 -0
  245. data/lib/kitsune.rb +1 -1
  246. metadata +243 -2
  247. data/generators/kitsune/templates/javascripts/nicEdit.js +0 -102
@@ -0,0 +1 @@
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 class="mceItemHidden mceVisualNbsp">&middot;</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)})();
@@ -0,0 +1,50 @@
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ (function() {
9
+ tinymce.create('tinymce.plugins.Nonbreaking', {
10
+ init : function(ed, url) {
11
+ var t = this;
12
+
13
+ t.editor = ed;
14
+
15
+ // Register commands
16
+ ed.addCommand('mceNonBreaking', function() {
17
+ ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHidden mceVisualNbsp">&middot;</span>' : '&nbsp;');
18
+ });
19
+
20
+ // Register buttons
21
+ ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
22
+
23
+ if (ed.getParam('nonbreaking_force_tab')) {
24
+ ed.onKeyDown.add(function(ed, e) {
25
+ if (tinymce.isIE && e.keyCode == 9) {
26
+ ed.execCommand('mceNonBreaking');
27
+ ed.execCommand('mceNonBreaking');
28
+ ed.execCommand('mceNonBreaking');
29
+ tinymce.dom.Event.cancel(e);
30
+ }
31
+ });
32
+ }
33
+ },
34
+
35
+ getInfo : function() {
36
+ return {
37
+ longname : 'Nonbreaking space',
38
+ author : 'Moxiecode Systems AB',
39
+ authorurl : 'http://tinymce.moxiecode.com',
40
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
41
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
42
+ };
43
+ }
44
+
45
+ // Private methods
46
+ });
47
+
48
+ // Register plugin
49
+ tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
50
+ })();
@@ -0,0 +1 @@
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)})();
@@ -0,0 +1,87 @@
1
+ /**
2
+ * $Id: editor_plugin_src.js 743 2008-03-23 17:47:33Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ (function() {
9
+ var Event = tinymce.dom.Event;
10
+
11
+ tinymce.create('tinymce.plugins.NonEditablePlugin', {
12
+ init : function(ed, url) {
13
+ var t = this, editClass, nonEditClass;
14
+
15
+ t.editor = ed;
16
+ editClass = ed.getParam("noneditable_editable_class", "mceEditable");
17
+ nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable");
18
+
19
+ ed.onNodeChange.addToTop(function(ed, cm, n) {
20
+ var sc, ec;
21
+
22
+ // Block if start or end is inside a non editable element
23
+ sc = ed.dom.getParent(ed.selection.getStart(), function(n) {
24
+ return ed.dom.hasClass(n, nonEditClass);
25
+ });
26
+
27
+ ec = ed.dom.getParent(ed.selection.getEnd(), function(n) {
28
+ return ed.dom.hasClass(n, nonEditClass);
29
+ });
30
+
31
+ // Block or unblock
32
+ if (sc || ec) {
33
+ t._setDisabled(1);
34
+ return false;
35
+ } else
36
+ t._setDisabled(0);
37
+ });
38
+ },
39
+
40
+ getInfo : function() {
41
+ return {
42
+ longname : 'Non editable elements',
43
+ author : 'Moxiecode Systems AB',
44
+ authorurl : 'http://tinymce.moxiecode.com',
45
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
46
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
47
+ };
48
+ },
49
+
50
+ _block : function(ed, e) {
51
+ var k = e.keyCode;
52
+
53
+ // Don't block arrow keys, pg up/down, and F1-F12
54
+ if ((k > 32 && k < 41) || (k > 111 && k < 124))
55
+ return;
56
+
57
+ return Event.cancel(e);
58
+ },
59
+
60
+ _setDisabled : function(s) {
61
+ var t = this, ed = t.editor;
62
+
63
+ tinymce.each(ed.controlManager.controls, function(c) {
64
+ c.setDisabled(s);
65
+ });
66
+
67
+ if (s !== t.disabled) {
68
+ if (s) {
69
+ ed.onKeyDown.addToTop(t._block);
70
+ ed.onKeyPress.addToTop(t._block);
71
+ ed.onKeyUp.addToTop(t._block);
72
+ ed.onPaste.addToTop(t._block);
73
+ } else {
74
+ ed.onKeyDown.remove(t._block);
75
+ ed.onKeyPress.remove(t._block);
76
+ ed.onKeyUp.remove(t._block);
77
+ ed.onPaste.remove(t._block);
78
+ }
79
+
80
+ t.disabled = s;
81
+ }
82
+ }
83
+ });
84
+
85
+ // Register plugin
86
+ tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin);
87
+ })();
@@ -0,0 +1 @@
1
+ .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../img/pagebreak.gif) no-repeat center top;}
@@ -0,0 +1 @@
1
+ (function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img src="'+d+'/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.settings.content_css!==false){b.dom.loadCSS(d+"/css/content.css")}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)})();
@@ -0,0 +1,74 @@
1
+ /**
2
+ * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ (function() {
9
+ tinymce.create('tinymce.plugins.PageBreakPlugin', {
10
+ init : function(ed, url) {
11
+ var pb = '<img src="' + url + '/img/trans.gif" class="mcePageBreak mceItemNoResize" />', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', '<!-- pagebreak -->'), pbRE;
12
+
13
+ pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g');
14
+
15
+ // Register commands
16
+ ed.addCommand('mcePageBreak', function() {
17
+ ed.execCommand('mceInsertContent', 0, pb);
18
+ });
19
+
20
+ // Register buttons
21
+ ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls});
22
+
23
+ ed.onInit.add(function() {
24
+ if (ed.settings.content_css !== false)
25
+ ed.dom.loadCSS(url + "/css/content.css");
26
+
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
+ })();
@@ -0,0 +1 @@
1
+ (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.PastePlugin",{init:function(c,d){var e=this,b;e.editor=c;e.url=d;e.onPreProcess=new tinymce.util.Dispatcher(e);e.onPostProcess=new tinymce.util.Dispatcher(e);e.onPreProcess.add(e._preProcess);e.onPostProcess.add(e._postProcess);e.onPreProcess.add(function(h,i){c.execCallback("paste_preprocess",h,i)});e.onPostProcess.add(function(h,i){c.execCallback("paste_postprocess",h,i)});function g(i){var h=c.dom;e.onPreProcess.dispatch(e,i);i.node=h.create("div",0,i.content);e.onPostProcess.dispatch(e,i);i.content=c.serializer.serialize(i.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(i.content)){e._insertBlockContent(c,h,i.content)}else{e._insert(i.content)}}c.addCommand("mceInsertClipboardContent",function(h,i){g(i)});function f(l){var p,k,i,j=c.selection,o=c.dom,h=c.getBody(),m;if(o.get("_mcePaste")){return}p=o.add(h,"div",{id:"_mcePaste"},"\uFEFF");if(h!=c.getDoc().body){m=o.getPos(c.selection.getStart(),h).y}else{m=h.scrollTop}o.setStyles(p,{position:"absolute",left:-10000,top:m,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){i=o.doc.body.createTextRange();i.moveToElementText(p);i.execCommand("Paste");o.remove(p);if(p.innerHTML==="\uFEFF"){c.execCommand("mcePasteWord");l.preventDefault();return}g({content:p.innerHTML});return tinymce.dom.Event.cancel(l)}else{k=c.selection.getRng();p=p.firstChild;i=c.getDoc().createRange();i.setStart(p,0);i.setEnd(p,1);j.setRng(i);window.setTimeout(function(){var q="",n=o.select("div[id=_mcePaste]");a(n,function(r){q+=(o.select("> span.Apple-style-span div",r)[0]||o.select("> span.Apple-style-span",r)[0]||r).innerHTML});a(n,function(r){o.remove(r)});if(k){j.setRng(k)}g({content:q})},0)}}if(c.getParam("paste_auto_cleanup_on_paste",true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){c.onKeyDown.add(function(h,i){if(((tinymce.isMac?i.metaKey:i.ctrlKey)&&i.keyCode==86)||(i.shiftKey&&i.keyCode==45)){f(i)}})}else{c.onPaste.addToTop(function(h,i){return f(i)})}}if(c.getParam("paste_block_drop")){c.onInit.add(function(){c.dom.bind(c.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(h){h.preventDefault();h.stopPropagation();return false})})}e._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(d,i){var b=this.editor,c=i.content,g,f;function g(h){a(h,function(j){if(j.constructor==RegExp){c=c.replace(j,"")}else{c=c.replace(j[0],j[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)||i.wordContent){i.wordContent=true;g([/^\s*(&nbsp;)+/g,/(&nbsp;|<br[^>]*>)+\s*$/g]);if(b.getParam("paste_convert_middot_lists",true)){g([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<span[^>]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}g([/<!--[\s\S]+?-->/gi,/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi,/<\\?\?xml[^>]*>/gi,/<\/?o:[^>]*>/gi,/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi,/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi,[/<(\/?)s>/gi,"<$1strike>"],/<script[^>]+>[\s\S]*?<\/script>/gi,[/&nbsp;/g,"\u00a0"]]);if(!b.getParam("paste_retain_style_properties")){g([/<\/?(span)[^>]*>/gi])}}f=b.getParam("paste_strip_class_attributes");if(f!="none"){function e(l,h){var k,j="";if(f=="all"){return""}h=tinymce.explode(h," ");for(k=h.length-1;k>=0;k--){if(!/^(Mso)/i.test(h[k])){j+=(!j?"":" ")+h[k]}}return' class="'+j+'"'}g([[/ class=\"([^\"]*)\"/gi,e],[/ class=(\w+)/gi,e]])}if(b.getParam("paste_remove_spans")){g([/<\/?(span)[^>]*>/gi])}i.content=c},_postProcess:function(e,g){var d=this,c=d.editor,f=c.dom,b;if(g.wordContent){a(f.select("a",g.node),function(h){if(!h.href||h.href.indexOf("#_Toc")!=-1){f.remove(h,1)}});if(d.editor.getParam("paste_convert_middot_lists",true)){d._convertLists(e,g)}b=c.getParam("paste_retain_style_properties");if(tinymce.is(b,"string")){b=tinymce.explode(b)}a(f.select("*",g.node),function(l){var m={},j=0,k,n,h;if(b){for(k=0;k<b.length;k++){n=b[k];h=f.getStyle(l,n);if(h){m[n]=h;j++}}}f.setAttrib(l,"style","");if(b&&j>0){f.setStyles(l,m)}else{if(l.nodeName=="SPAN"&&!l.className){f.remove(l,true)}}})}if(c.getParam("paste_remove_styles")||(c.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){a(f.select("*[style]",g.node),function(h){h.removeAttribute("style");h.removeAttribute("mce_style")})}else{if(tinymce.isWebKit){a(f.select("*",g.node),function(h){h.removeAttribute("mce_style")})}}},_convertLists:function(e,c){var g=e.editor.dom,f,j,b=-1,d,k=[],i,h;a(g.select("p",c.node),function(r){var n,s="",q,o,l,m;for(n=r.firstChild;n&&n.nodeType==3;n=n.nextSibling){s+=n.nodeValue}s=r.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/&nbsp;/g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(s)){q="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(s)){q="ol"}if(q){d=parseFloat(r.style.marginLeft||0);if(d>b){k.push(d)}if(!f||q!=i){f=g.create(q);g.insertAfter(f,r)}else{if(d>b){f=j.appendChild(g.create(q))}else{if(d<b){l=tinymce.inArray(k,d);m=g.getParents(f.parentNode,q);f=m[m.length-1-l]||f}}}a(g.select("span",r),function(t){var p=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(q=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){g.remove(t)}else{if(/^[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(p)){g.remove(t)}}});o=r.innerHTML;if(q=="ul"){o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*(&nbsp;|\u00a0)+\s*/,"")}else{o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/,"")}j=f.appendChild(g.create("li",0,o));g.remove(r);b=d;i=q}else{f=b=0}});h=c.node.innerHTML;if(h.indexOf("__MCE_ITEM__")!=-1){c.node.innerHTML=h.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(h,e,i){var c,g,d=h.selection,m,j,b,k,f;function l(p){var o;if(tinymce.isIE){o=h.getDoc().body.createTextRange();o.moveToElementText(p);o.collapse(false);o.select()}else{d.select(p,1);d.collapse(false)}}this._insert('<span id="_marker">&nbsp;</span>',1);g=e.get("_marker");c=e.getParent(g,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(c&&!/TD|TH/.test(c.nodeName)){g=e.split(c,g);a(e.create("div",0,i).childNodes,function(o){m=g.parentNode.insertBefore(o.cloneNode(true),g)});l(m)}else{e.setOuterHTML(g,i);d.select(h.getBody(),1);d.collapse(0)}e.remove("_marker");j=d.getStart();b=e.getViewPort(h.getWin());k=h.dom.getPos(j).y;f=j.clientHeight;if(k<b.y||k+f>b.y+b.h){h.getDoc().body.scrollTop=k<b.y?k:k-b.h+25}},_insert:function(d,b){var c=this.editor;if(!c.selection.isCollapsed()){c.getDoc().execCommand("Delete",false,null)}c.execCommand(tinymce.isGecko?"insertHTML":"mceInsertContent",false,d,{skip_undo:b})},_legacySupport:function(){var c=this,b=c.editor;a(["mcePasteText","mcePasteWord"],function(d){b.addCommand(d,function(){b.windowManager.open({file:c.url+(d=="mcePasteText"?"/pastetext.htm":"/pasteword.htm"),width:parseInt(b.getParam("paste_dialog_width","450")),height:parseInt(b.getParam("paste_dialog_height","400")),inline:1})})});b.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});b.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"});b.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
@@ -0,0 +1,531 @@
1
+ /**
2
+ * $Id: editor_plugin_src.js 1225 2009-09-07 19:06:19Z spocke $
3
+ *
4
+ * @author Moxiecode
5
+ * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
6
+ */
7
+
8
+ (function() {
9
+ var each = tinymce.each;
10
+
11
+ tinymce.create('tinymce.plugins.PastePlugin', {
12
+ init : function(ed, url) {
13
+ var t = this, cb;
14
+
15
+ t.editor = ed;
16
+ t.url = url;
17
+
18
+ // Setup plugin events
19
+ t.onPreProcess = new tinymce.util.Dispatcher(t);
20
+ t.onPostProcess = new tinymce.util.Dispatcher(t);
21
+
22
+ // Register default handlers
23
+ t.onPreProcess.add(t._preProcess);
24
+ t.onPostProcess.add(t._postProcess);
25
+
26
+ // Register optional preprocess handler
27
+ t.onPreProcess.add(function(pl, o) {
28
+ ed.execCallback('paste_preprocess', pl, o);
29
+ });
30
+
31
+ // Register optional postprocess
32
+ t.onPostProcess.add(function(pl, o) {
33
+ ed.execCallback('paste_postprocess', pl, o);
34
+ });
35
+
36
+ // This function executes the process handlers and inserts the contents
37
+ function process(o) {
38
+ var dom = ed.dom;
39
+
40
+ // Execute pre process handlers
41
+ t.onPreProcess.dispatch(t, o);
42
+
43
+ // Create DOM structure
44
+ o.node = dom.create('div', 0, o.content);
45
+
46
+ // Execute post process handlers
47
+ t.onPostProcess.dispatch(t, o);
48
+
49
+ // Serialize content
50
+ o.content = ed.serializer.serialize(o.node, {getInner : 1});
51
+
52
+ // Insert cleaned content. We need to handle insertion of contents containing block elements separately
53
+ if (/<(p|h[1-6]|ul|ol)/.test(o.content))
54
+ t._insertBlockContent(ed, dom, o.content);
55
+ else
56
+ t._insert(o.content);
57
+ };
58
+
59
+ // Add command for external usage
60
+ ed.addCommand('mceInsertClipboardContent', function(u, o) {
61
+ process(o);
62
+ });
63
+
64
+ // This function grabs the contents from the clipboard by adding a
65
+ // hidden div and placing the caret inside it and after the browser paste
66
+ // is done it grabs that contents and processes that
67
+ function grabContent(e) {
68
+ var n, or, rng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY;
69
+
70
+ if (dom.get('_mcePaste'))
71
+ return;
72
+
73
+ // Create container to paste into
74
+ n = dom.add(body, 'div', {id : '_mcePaste'}, '\uFEFF');
75
+
76
+ // If contentEditable mode we need to find out the position of the closest element
77
+ if (body != ed.getDoc().body)
78
+ posY = dom.getPos(ed.selection.getStart(), body).y;
79
+ else
80
+ posY = body.scrollTop;
81
+
82
+ // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
83
+ dom.setStyles(n, {
84
+ position : 'absolute',
85
+ left : -10000,
86
+ top : posY,
87
+ width : 1,
88
+ height : 1,
89
+ overflow : 'hidden'
90
+ });
91
+
92
+ if (tinymce.isIE) {
93
+ // Select the container
94
+ rng = dom.doc.body.createTextRange();
95
+ rng.moveToElementText(n);
96
+ rng.execCommand('Paste');
97
+
98
+ // Remove container
99
+ dom.remove(n);
100
+
101
+ // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
102
+ // to IE security settings so we pass the junk though better than nothing right
103
+ if (n.innerHTML === '\uFEFF') {
104
+ ed.execCommand('mcePasteWord');
105
+ e.preventDefault();
106
+ return;
107
+ }
108
+
109
+ // Process contents
110
+ process({content : n.innerHTML});
111
+
112
+ // Block the real paste event
113
+ return tinymce.dom.Event.cancel(e);
114
+ } else {
115
+ or = ed.selection.getRng();
116
+
117
+ // Move caret into hidden div
118
+ n = n.firstChild;
119
+ rng = ed.getDoc().createRange();
120
+ rng.setStart(n, 0);
121
+ rng.setEnd(n, 1);
122
+ sel.setRng(rng);
123
+
124
+ // Wait a while and grab the pasted contents
125
+ window.setTimeout(function() {
126
+ var h = '', nl = dom.select('div[id=_mcePaste]');
127
+
128
+ // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
129
+ each(nl, function(n) {
130
+ h += (dom.select('> span.Apple-style-span div', n)[0] || dom.select('> span.Apple-style-span', n)[0] || n).innerHTML;
131
+ });
132
+
133
+ // Remove the nodes
134
+ each(nl, function(n) {
135
+ dom.remove(n);
136
+ });
137
+
138
+ // Restore the old selection
139
+ if (or)
140
+ sel.setRng(or);
141
+
142
+ process({content : h});
143
+ }, 0);
144
+ }
145
+ };
146
+
147
+ // Check if we should use the new auto process method
148
+ if (ed.getParam('paste_auto_cleanup_on_paste', true)) {
149
+ // Is it's Opera or older FF use key handler
150
+ if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
151
+ ed.onKeyDown.add(function(ed, e) {
152
+ if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
153
+ grabContent(e);
154
+ });
155
+ } else {
156
+ // Grab contents on paste event on Gecko and WebKit
157
+ ed.onPaste.addToTop(function(ed, e) {
158
+ return grabContent(e);
159
+ });
160
+ }
161
+ }
162
+
163
+ // Block all drag/drop events
164
+ if (ed.getParam('paste_block_drop')) {
165
+ ed.onInit.add(function() {
166
+ ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
167
+ e.preventDefault();
168
+ e.stopPropagation();
169
+
170
+ return false;
171
+ });
172
+ });
173
+ }
174
+
175
+ // Add legacy support
176
+ t._legacySupport();
177
+ },
178
+
179
+ getInfo : function() {
180
+ return {
181
+ longname : 'Paste text/word',
182
+ author : 'Moxiecode Systems AB',
183
+ authorurl : 'http://tinymce.moxiecode.com',
184
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
185
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
186
+ };
187
+ },
188
+
189
+ _preProcess : function(pl, o) {
190
+ var ed = this.editor, h = o.content, process, stripClass;
191
+
192
+ //console.log('Before preprocess:' + o.content);
193
+
194
+ function process(items) {
195
+ each(items, function(v) {
196
+ // Remove or replace
197
+ if (v.constructor == RegExp)
198
+ h = h.replace(v, '');
199
+ else
200
+ h = h.replace(v[0], v[1]);
201
+ });
202
+ };
203
+
204
+ // Detect Word content and process it more aggressive
205
+ if (/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(h) || o.wordContent) {
206
+ o.wordContent = true; // Mark the pasted contents as word specific content
207
+ //console.log('Word contents detected.');
208
+
209
+ // Process away some basic content
210
+ process([
211
+ /^\s*(&nbsp;)+/g, // nbsp entities at the start of contents
212
+ /(&nbsp;|<br[^>]*>)+\s*$/g // nbsp entities at the end of contents
213
+ ]);
214
+
215
+ if (ed.getParam('paste_convert_middot_lists', true)) {
216
+ process([
217
+ [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
218
+ [/(<span[^>]+:\s*symbol[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert symbol spans to list items
219
+ [/(<span[^>]+mso-list:[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list to item marker
220
+ ]);
221
+ }
222
+
223
+ process([
224
+ /<!--[\s\S]+?-->/gi, // Word comments
225
+ /<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi, // Remove some tags including VML content
226
+ /<\\?\?xml[^>]*>/gi, // XML namespace declarations
227
+ /<\/?o:[^>]*>/gi, // MS namespaced elements <o:tag>
228
+ / (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi, // on.., class, style and language attributes with quotes
229
+ / (id|name|language|type|on\w+|v:\w+)=(\w+)/gi, // on.., class, style and language attributes without quotes (IE)
230
+ [/<(\/?)s>/gi, '<$1strike>'], // Convert <s> into <strike> for line-though
231
+ /<script[^>]+>[\s\S]*?<\/script>/gi, // All scripts elements for msoShowComment for example
232
+ [/&nbsp;/g, '\u00a0'] // Replace nsbp entites to char since it's easier to handle
233
+ ]);
234
+
235
+ // Remove all spans if no styles is to be retained
236
+ if (!ed.getParam('paste_retain_style_properties')) {
237
+ process([
238
+ /<\/?(span)[^>]*>/gi
239
+ ]);
240
+ }
241
+ }
242
+
243
+ // Allow for class names to be retained if desired; either all, or just the ones from Word
244
+ // Note that the paste_strip_class_attributes: 'none, verify_css_classes: true is also a good variation.
245
+ stripClass = ed.getParam('paste_strip_class_attributes');
246
+ if (stripClass != 'none') {
247
+ // Cleans everything but mceItem... classes
248
+ function cleanClasses(str, cls) {
249
+ var i, out = '';
250
+
251
+ // Remove all classes
252
+ if (stripClass == 'all')
253
+ return '';
254
+
255
+ cls = tinymce.explode(cls, ' ');
256
+
257
+ for (i = cls.length - 1; i >= 0; i--) {
258
+ // Remove Mso classes
259
+ if (!/^(Mso)/i.test(cls[i]))
260
+ out += (!out ? '' : ' ') + cls[i];
261
+ }
262
+
263
+ return ' class="' + out + '"';
264
+ };
265
+
266
+ process([
267
+ [/ class=\"([^\"]*)\"/gi, cleanClasses], // class attributes with quotes
268
+ [/ class=(\w+)/gi, cleanClasses] // class attributes without quotes (IE)
269
+ ]);
270
+ }
271
+
272
+ // Remove spans option
273
+ if (ed.getParam('paste_remove_spans')) {
274
+ process([
275
+ /<\/?(span)[^>]*>/gi
276
+ ]);
277
+ }
278
+
279
+ //console.log('After preprocess:' + h);
280
+
281
+ o.content = h;
282
+ },
283
+
284
+ /**
285
+ * Various post process items.
286
+ */
287
+ _postProcess : function(pl, o) {
288
+ var t = this, ed = t.editor, dom = ed.dom, styleProps;
289
+
290
+ if (o.wordContent) {
291
+ // Remove named anchors or TOC links
292
+ each(dom.select('a', o.node), function(a) {
293
+ if (!a.href || a.href.indexOf('#_Toc') != -1)
294
+ dom.remove(a, 1);
295
+ });
296
+
297
+ if (t.editor.getParam('paste_convert_middot_lists', true))
298
+ t._convertLists(pl, o);
299
+
300
+ // Process styles
301
+ styleProps = ed.getParam('paste_retain_style_properties'); // retained properties
302
+
303
+ // If string property then split it
304
+ if (tinymce.is(styleProps, 'string'))
305
+ styleProps = tinymce.explode(styleProps);
306
+
307
+ // Retains some style properties
308
+ each(dom.select('*', o.node), function(el) {
309
+ var newStyle = {}, npc = 0, i, sp, sv;
310
+
311
+ // Store a subset of the existing styles
312
+ if (styleProps) {
313
+ for (i = 0; i < styleProps.length; i++) {
314
+ sp = styleProps[i];
315
+ sv = dom.getStyle(el, sp);
316
+
317
+ if (sv) {
318
+ newStyle[sp] = sv;
319
+ npc++;
320
+ }
321
+ }
322
+ }
323
+
324
+ // Remove all of the existing styles
325
+ dom.setAttrib(el, 'style', '');
326
+
327
+ if (styleProps && npc > 0)
328
+ dom.setStyles(el, newStyle); // Add back the stored subset of styles
329
+ else // Remove empty span tags that do not have class attributes
330
+ if (el.nodeName == 'SPAN' && !el.className)
331
+ dom.remove(el, true);
332
+ });
333
+ }
334
+
335
+ // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
336
+ if (ed.getParam("paste_remove_styles") || (ed.getParam("paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
337
+ each(dom.select('*[style]', o.node), function(el) {
338
+ el.removeAttribute('style');
339
+ el.removeAttribute('mce_style');
340
+ });
341
+ } else {
342
+ if (tinymce.isWebKit) {
343
+ // 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 ..." />
344
+ // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
345
+ each(dom.select('*', o.node), function(el) {
346
+ el.removeAttribute('mce_style');
347
+ });
348
+ }
349
+ }
350
+ },
351
+
352
+ /**
353
+ * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
354
+ */
355
+ _convertLists : function(pl, o) {
356
+ var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
357
+
358
+ // Convert middot lists into real semantic lists
359
+ each(dom.select('p', o.node), function(p) {
360
+ var sib, val = '', type, html, idx, parents;
361
+
362
+ // Get text node value at beginning of paragraph
363
+ for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
364
+ val += sib.nodeValue;
365
+
366
+ val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
367
+
368
+ // Detect unordered lists look for bullets
369
+ if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val))
370
+ type = 'ul';
371
+
372
+ // Detect ordered lists 1., a. or ixv.
373
+ if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val))
374
+ type = 'ol';
375
+
376
+ // Check if node value matches the list pattern: o&nbsp;&nbsp;
377
+ if (type) {
378
+ margin = parseFloat(p.style.marginLeft || 0);
379
+
380
+ if (margin > lastMargin)
381
+ levels.push(margin);
382
+
383
+ if (!listElm || type != lastType) {
384
+ listElm = dom.create(type);
385
+ dom.insertAfter(listElm, p);
386
+ } else {
387
+ // Nested list element
388
+ if (margin > lastMargin) {
389
+ listElm = li.appendChild(dom.create(type));
390
+ } else if (margin < lastMargin) {
391
+ // Find parent level based on margin value
392
+ idx = tinymce.inArray(levels, margin);
393
+ parents = dom.getParents(listElm.parentNode, type);
394
+ listElm = parents[parents.length - 1 - idx] || listElm;
395
+ }
396
+ }
397
+
398
+ // Remove middot or number spans if they exists
399
+ each(dom.select('span', p), function(span) {
400
+ var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
401
+
402
+ // Remove span with the middot or the number
403
+ if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html))
404
+ dom.remove(span);
405
+ else if (/^[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
406
+ dom.remove(span);
407
+ });
408
+
409
+ html = p.innerHTML;
410
+
411
+ // Remove middot/list items
412
+ if (type == 'ul')
413
+ html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*(&nbsp;|\u00a0)+\s*/, '');
414
+ else
415
+ html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
416
+
417
+ // Create li and add paragraph data into the new li
418
+ li = listElm.appendChild(dom.create('li', 0, html));
419
+ dom.remove(p);
420
+
421
+ lastMargin = margin;
422
+ lastType = type;
423
+ } else
424
+ listElm = lastMargin = 0; // End list element
425
+ });
426
+
427
+ // Remove any left over makers
428
+ html = o.node.innerHTML;
429
+ if (html.indexOf('__MCE_ITEM__') != -1)
430
+ o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
431
+ },
432
+
433
+ /**
434
+ * This method will split the current block parent and insert the contents inside the split position.
435
+ * This logic can be improved so text nodes at the start/end remain in the start/end block elements
436
+ */
437
+ _insertBlockContent : function(ed, dom, content) {
438
+ var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight;
439
+
440
+ function select(n) {
441
+ var r;
442
+
443
+ if (tinymce.isIE) {
444
+ r = ed.getDoc().body.createTextRange();
445
+ r.moveToElementText(n);
446
+ r.collapse(false);
447
+ r.select();
448
+ } else {
449
+ sel.select(n, 1);
450
+ sel.collapse(false);
451
+ }
452
+ };
453
+
454
+ // Insert a marker for the caret position
455
+ this._insert('<span id="_marker">&nbsp;</span>', 1);
456
+ marker = dom.get('_marker');
457
+ parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td');
458
+
459
+ // If it's a parent block but not a table cell
460
+ if (parentBlock && !/TD|TH/.test(parentBlock.nodeName)) {
461
+ // Split parent block
462
+ marker = dom.split(parentBlock, marker);
463
+
464
+ // Insert nodes before the marker
465
+ each(dom.create('div', 0, content).childNodes, function(n) {
466
+ last = marker.parentNode.insertBefore(n.cloneNode(true), marker);
467
+ });
468
+
469
+ // Move caret after marker
470
+ select(last);
471
+ } else {
472
+ dom.setOuterHTML(marker, content);
473
+ sel.select(ed.getBody(), 1);
474
+ sel.collapse(0);
475
+ }
476
+
477
+ dom.remove('_marker'); // Remove marker if it's left
478
+
479
+ // Get element, position and height
480
+ elm = sel.getStart();
481
+ vp = dom.getViewPort(ed.getWin());
482
+ y = ed.dom.getPos(elm).y;
483
+ elmHeight = elm.clientHeight;
484
+
485
+ // Is element within viewport if not then scroll it into view
486
+ if (y < vp.y || y + elmHeight > vp.y + vp.h)
487
+ ed.getDoc().body.scrollTop = y < vp.y ? y : y - vp.h + 25;
488
+ },
489
+
490
+ /**
491
+ * Inserts the specified contents at the caret position.
492
+ */
493
+ _insert : function(h, skip_undo) {
494
+ var ed = this.editor;
495
+
496
+ // First delete the contents seems to work better on WebKit
497
+ if (!ed.selection.isCollapsed())
498
+ ed.getDoc().execCommand('Delete', false, null);
499
+
500
+ // It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents
501
+ ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo});
502
+ },
503
+
504
+ /**
505
+ * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
506
+ */
507
+ _legacySupport : function() {
508
+ var t = this, ed = t.editor;
509
+
510
+ // Register commands for backwards compatibility
511
+ each(['mcePasteText', 'mcePasteWord'], function(cmd) {
512
+ ed.addCommand(cmd, function() {
513
+ ed.windowManager.open({
514
+ file : t.url + (cmd == 'mcePasteText' ? '/pastetext.htm' : '/pasteword.htm'),
515
+ width : parseInt(ed.getParam("paste_dialog_width", "450")),
516
+ height : parseInt(ed.getParam("paste_dialog_height", "400")),
517
+ inline : 1
518
+ });
519
+ });
520
+ });
521
+
522
+ // Register buttons for backwards compatibility
523
+ ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText'});
524
+ ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord'});
525
+ ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'selectall'});
526
+ }
527
+ });
528
+
529
+ // Register plugin
530
+ tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin);
531
+ })();