radiant-ck_editor_filter-extension 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (577) hide show
  1. data/LICENSE +21 -0
  2. data/README.markdown +55 -0
  3. data/Rakefile +138 -0
  4. data/VERSION +1 -0
  5. data/app/models/ckeditor_interface.rb +15 -0
  6. data/app/views/admin/assets/_asset.html.haml +19 -0
  7. data/app/views/admin/pages/_editor_control.html.haml +1 -0
  8. data/ck_editor_filter_extension.rb +25 -0
  9. data/ckeditor.html +0 -0
  10. data/cucumber.yml +1 -0
  11. data/features/support/env.rb +16 -0
  12. data/features/support/paths.rb +14 -0
  13. data/lib/ck_editor_filter.rb +7 -0
  14. data/lib/tasks/ck_editor_filter_extension_tasks.rake +28 -0
  15. data/public/images/admin/tmp_thumbnail_icon.png +0 -0
  16. data/public/javascripts/extensions/ck_editor_filter/ckeditor/.htaccess +24 -0
  17. data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.html +538 -0
  18. data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +92 -0
  19. data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.html +1334 -0
  20. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ajax.html +100 -0
  21. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api.html +152 -0
  22. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog.html +181 -0
  23. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog/my_dialog.js +28 -0
  24. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/divreplace.html +137 -0
  25. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/enterkey.html +88 -0
  26. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/fullpage.html +62 -0
  27. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/index.html +53 -0
  28. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/jqueryadapter.html +73 -0
  29. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/advanced.php +93 -0
  30. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/events.php +130 -0
  31. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replace.php +63 -0
  32. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replaceall.php +68 -0
  33. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/standalone.php +64 -0
  34. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebyclass.html +49 -0
  35. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebycode.html +80 -0
  36. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.css +81 -0
  37. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.js +65 -0
  38. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample_posteddata.php +59 -0
  39. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sharedspaces.html +131 -0
  40. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/skins.html +83 -0
  41. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_color.html +87 -0
  42. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_languages.html +104 -0
  43. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/adapters/jquery.js +297 -0
  44. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/_bootstrap.js +84 -0
  45. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ajax.js +143 -0
  46. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor.js +103 -0
  47. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_base.js +190 -0
  48. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_basic.js +241 -0
  49. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/command.js +73 -0
  50. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/commanddefinition.js +86 -0
  51. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/config.js +307 -0
  52. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dataprocessor.js +66 -0
  53. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom.js +21 -0
  54. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/comment.js +32 -0
  55. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/document.js +224 -0
  56. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/documentfragment.js +49 -0
  57. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/domobject.js +210 -0
  58. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/element.js +1441 -0
  59. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js +104 -0
  60. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/event.js +142 -0
  61. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/node.js +662 -0
  62. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/nodelist.js +23 -0
  63. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/range.js +1735 -0
  64. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/text.js +123 -0
  65. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/walker.js +451 -0
  66. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/window.js +96 -0
  67. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dtd.js +233 -0
  68. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor.js +720 -0
  69. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor_basic.js +179 -0
  70. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/env.js +219 -0
  71. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/event.js +336 -0
  72. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/eventInfo.js +120 -0
  73. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/focusmanager.js +137 -0
  74. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser.js +212 -0
  75. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
  76. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/cdata.js +43 -0
  77. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/comment.js +60 -0
  78. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/element.js +240 -0
  79. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/filter.js +262 -0
  80. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/fragment.js +495 -0
  81. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/text.js +55 -0
  82. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/imagecacher.js +58 -0
  83. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/lang.js +152 -0
  84. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/loader.js +242 -0
  85. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugindefinition.js +66 -0
  86. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugins.js +85 -0
  87. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/resourcemanager.js +238 -0
  88. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/scriptloader.js +198 -0
  89. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/skins.js +204 -0
  90. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/themes.js +19 -0
  91. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/tools.js +685 -0
  92. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ui.js +116 -0
  93. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/xml.js +165 -0
  94. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_languages.js +83 -0
  95. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_translationstatus.txt +60 -0
  96. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/af.js +699 -0
  97. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ar.js +699 -0
  98. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bg.js +699 -0
  99. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bn.js +699 -0
  100. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bs.js +699 -0
  101. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ca.js +699 -0
  102. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cs.js +699 -0
  103. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cy.js +699 -0
  104. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/da.js +699 -0
  105. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/de.js +699 -0
  106. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/el.js +699 -0
  107. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-au.js +699 -0
  108. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-ca.js +699 -0
  109. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-gb.js +699 -0
  110. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en.js +699 -0
  111. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eo.js +699 -0
  112. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/es.js +699 -0
  113. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/et.js +699 -0
  114. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eu.js +699 -0
  115. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fa.js +699 -0
  116. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fi.js +699 -0
  117. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fo.js +699 -0
  118. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr-ca.js +699 -0
  119. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr.js +699 -0
  120. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gl.js +699 -0
  121. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gu.js +699 -0
  122. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/he.js +699 -0
  123. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hi.js +699 -0
  124. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hr.js +699 -0
  125. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hu.js +699 -0
  126. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/is.js +699 -0
  127. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/it.js +699 -0
  128. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ja.js +699 -0
  129. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/km.js +699 -0
  130. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ko.js +699 -0
  131. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lt.js +699 -0
  132. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lv.js +699 -0
  133. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/mn.js +699 -0
  134. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ms.js +699 -0
  135. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nb.js +699 -0
  136. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nl.js +699 -0
  137. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/no.js +699 -0
  138. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pl.js +699 -0
  139. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt-br.js +699 -0
  140. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt.js +699 -0
  141. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ro.js +699 -0
  142. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ru.js +699 -0
  143. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sk.js +699 -0
  144. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sl.js +699 -0
  145. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr-latn.js +699 -0
  146. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr.js +699 -0
  147. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sv.js +699 -0
  148. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/th.js +699 -0
  149. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/tr.js +699 -0
  150. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/uk.js +699 -0
  151. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/vi.js +699 -0
  152. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh-cn.js +699 -0
  153. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh.js +699 -0
  154. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +211 -0
  155. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
  156. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/plugin.js +46 -0
  157. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/about.js +73 -0
  158. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  159. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/plugin.js +23 -0
  160. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/basicstyles/plugin.js +93 -0
  161. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/blockquote/plugin.js +301 -0
  162. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/button/plugin.js +270 -0
  163. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/dialogs/paste.js +186 -0
  164. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/plugin.js +382 -0
  165. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colorbutton/plugin.js +227 -0
  166. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +191 -0
  167. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/plugin.js +13 -0
  168. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/contextmenu/plugin.js +274 -0
  169. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/dialogDefinition.js +315 -0
  170. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/plugin.js +2884 -0
  171. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogui/plugin.js +1408 -0
  172. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/dialogs/div.js +535 -0
  173. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/plugin.js +121 -0
  174. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/domiterator/plugin.js +355 -0
  175. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/editingblock/plugin.js +224 -0
  176. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/elementspath/plugin.js +189 -0
  177. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/enterkey/plugin.js +329 -0
  178. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/entities/plugin.js +200 -0
  179. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/fakeobjects/plugin.js +120 -0
  180. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/filebrowser/plugin.js +479 -0
  181. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/dialogs/find.js +853 -0
  182. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/plugin.js +46 -0
  183. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/dialogs/flash.js +690 -0
  184. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  185. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/plugin.js +165 -0
  186. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/floatpanel/plugin.js +376 -0
  187. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/font/plugin.js +233 -0
  188. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/format/plugin.js +193 -0
  189. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/button.js +135 -0
  190. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/checkbox.js +143 -0
  191. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/form.js +177 -0
  192. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +91 -0
  193. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/radio.js +135 -0
  194. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/select.js +556 -0
  195. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textarea.js +114 -0
  196. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textfield.js +193 -0
  197. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/plugin.js +217 -0
  198. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/horizontalrule/plugin.js +36 -0
  199. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmldataprocessor/plugin.js +458 -0
  200. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmlwriter/plugin.js +314 -0
  201. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframedialog/plugin.js +136 -0
  202. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/dialogs/image.js +1378 -0
  203. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/plugin.js +64 -0
  204. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/indent/plugin.js +349 -0
  205. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/justify/plugin.js +168 -0
  206. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/keystrokes/plugin.js +229 -0
  207. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/anchor.js +99 -0
  208. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/link.js +1421 -0
  209. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  210. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/plugin.js +188 -0
  211. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/list/plugin.js +643 -0
  212. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/listblock/plugin.js +252 -0
  213. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/maximize/plugin.js +283 -0
  214. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menu/plugin.js +406 -0
  215. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menubutton/plugin.js +93 -0
  216. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/newpage/plugin.js +54 -0
  217. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  218. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/plugin.js +98 -0
  219. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panel/plugin.js +379 -0
  220. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panelbutton/plugin.js +147 -0
  221. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/filter/default.js +1179 -0
  222. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/plugin.js +120 -0
  223. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +77 -0
  224. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/plugin.js +162 -0
  225. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/popup/plugin.js +62 -0
  226. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/preview/plugin.js +108 -0
  227. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/print/plugin.js +41 -0
  228. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/removeformat/plugin.js +132 -0
  229. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/resize/plugin.js +115 -0
  230. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/richcombo/plugin.js +367 -0
  231. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js +55 -0
  232. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/options.js +533 -0
  233. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +71 -0
  234. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/plugin.js +603 -0
  235. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/selection/plugin.js +1103 -0
  236. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  237. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  238. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  239. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  240. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  241. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  242. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  243. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  244. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  245. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  246. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  247. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/plugin.js +154 -0
  248. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showborders/plugin.js +170 -0
  249. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/dialogs/smiley.js +215 -0
  250. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  251. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  252. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  253. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  254. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  255. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  256. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  257. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  258. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  259. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  260. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  261. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  262. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  263. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  264. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  265. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  266. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  267. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  268. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  269. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  270. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  271. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/plugin.js +85 -0
  272. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/sourcearea/plugin.js +205 -0
  273. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +373 -0
  274. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/plugin.js +29 -0
  275. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/styles/plugin.js +1258 -0
  276. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/plugin.js +282 -0
  277. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/styles/default.js +85 -0
  278. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tab/plugin.js +261 -0
  279. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/dialogs/table.js +589 -0
  280. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js +70 -0
  281. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +523 -0
  282. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/plugin.js +1022 -0
  283. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/dialogs/templates.js +229 -0
  284. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/plugin.js +100 -0
  285. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/default.js +94 -0
  286. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  287. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  288. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  289. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/toolbar/plugin.js +474 -0
  290. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +204 -0
  291. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/en.js +15 -0
  292. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/plugin.js +37 -0
  293. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  294. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  295. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  296. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  297. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  298. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +15 -0
  299. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/yui.js +71 -0
  300. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/undo/plugin.js +519 -0
  301. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +49 -0
  302. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  303. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.css +83 -0
  304. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.js +176 -0
  305. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/plugin.js +33 -0
  306. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wysiwygarea/plugin.js +851 -0
  307. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/dialog.css +822 -0
  308. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/editor.css +25 -0
  309. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/elementspath.css +72 -0
  310. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.css +326 -0
  311. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.png +0 -0
  312. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  313. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  314. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  315. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  316. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  317. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  318. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  319. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  320. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/mainui.css +183 -0
  321. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/menu.css +211 -0
  322. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/panel.css +216 -0
  323. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/presets.css +49 -0
  324. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/reset.css +78 -0
  325. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/richcombo.css +270 -0
  326. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/skin.js +268 -0
  327. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/templates.css +84 -0
  328. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/toolbar.css +421 -0
  329. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/dialog.css +728 -0
  330. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/editor.css +25 -0
  331. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/elementspath.css +73 -0
  332. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.css +324 -0
  333. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.png +0 -0
  334. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  335. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  336. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  337. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  338. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  339. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  340. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  341. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/mainui.css +127 -0
  342. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/menu.css +207 -0
  343. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/panel.css +211 -0
  344. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/presets.css +49 -0
  345. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/reset.css +78 -0
  346. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/richcombo.css +289 -0
  347. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/skin.js +81 -0
  348. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/templates.css +81 -0
  349. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/toolbar.css +475 -0
  350. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/dialog.css +743 -0
  351. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/editor.css +25 -0
  352. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/elementspath.css +73 -0
  353. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.css +324 -0
  354. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.png +0 -0
  355. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  356. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  357. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  358. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  359. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  360. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  361. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  362. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  363. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/mainui.css +142 -0
  364. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/menu.css +210 -0
  365. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/panel.css +211 -0
  366. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/presets.css +50 -0
  367. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/reset.css +78 -0
  368. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/richcombo.css +289 -0
  369. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/skin.js +77 -0
  370. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/templates.css +81 -0
  371. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/toolbar.css +425 -0
  372. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/themes/default/theme.js +334 -0
  373. data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +6 -0
  374. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +121 -0
  375. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.pack +205 -0
  376. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.php +29 -0
  377. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +8 -0
  378. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +20 -0
  379. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php4.php +593 -0
  380. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php5.php +583 -0
  381. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +25 -0
  382. data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +11 -0
  383. data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +35 -0
  384. data/public/javascripts/extensions/ck_editor_filter/ckeditor/images/spacer.gif +0 -0
  385. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +6 -0
  386. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +60 -0
  387. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +6 -0
  388. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +6 -0
  389. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +6 -0
  390. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +6 -0
  391. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +6 -0
  392. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +6 -0
  393. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +6 -0
  394. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +6 -0
  395. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +6 -0
  396. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +6 -0
  397. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +6 -0
  398. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +6 -0
  399. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +6 -0
  400. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +6 -0
  401. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +6 -0
  402. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +6 -0
  403. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +6 -0
  404. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +6 -0
  405. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +6 -0
  406. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +6 -0
  407. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +6 -0
  408. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +6 -0
  409. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +6 -0
  410. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +6 -0
  411. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +6 -0
  412. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +6 -0
  413. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +6 -0
  414. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +6 -0
  415. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +6 -0
  416. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +6 -0
  417. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +6 -0
  418. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +6 -0
  419. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +6 -0
  420. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +6 -0
  421. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +6 -0
  422. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +6 -0
  423. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +6 -0
  424. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +6 -0
  425. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +6 -0
  426. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +6 -0
  427. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +6 -0
  428. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +6 -0
  429. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +6 -0
  430. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +6 -0
  431. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +6 -0
  432. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +6 -0
  433. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +6 -0
  434. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +6 -0
  435. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +6 -0
  436. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +6 -0
  437. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +6 -0
  438. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +6 -0
  439. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +6 -0
  440. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +6 -0
  441. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +6 -0
  442. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +6 -0
  443. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +6 -0
  444. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +6 -0
  445. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/dialogs/mediaembed.html +14 -0
  446. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/images/icon.gif +0 -0
  447. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/plugin.js +61 -0
  448. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -0
  449. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
  450. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +6 -0
  451. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  452. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
  453. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +6 -0
  454. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  455. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +7 -0
  456. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +9 -0
  457. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +9 -0
  458. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/images/placeholder.png +0 -0
  459. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +6 -0
  460. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +6 -0
  461. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +6 -0
  462. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
  463. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +6 -0
  464. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +9 -0
  465. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +6 -0
  466. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +6 -0
  467. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +6 -0
  468. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +13 -0
  469. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +6 -0
  470. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +11 -0
  471. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/images/anchor.gif +0 -0
  472. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  473. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/images/icon.png +0 -0
  474. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/plugin.js +21 -0
  475. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +10 -0
  476. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
  477. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +8 -0
  478. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +6 -0
  479. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  480. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  481. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  482. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  483. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  484. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  485. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  486. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  487. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  488. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  489. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  490. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
  491. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  492. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  493. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  494. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  495. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  496. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  497. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  498. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  499. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/heart.gif +0 -0
  500. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  501. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  502. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  503. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  504. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  505. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  506. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  507. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  508. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  509. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  510. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  511. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  512. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
  513. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylescombo/styles/default.js +6 -0
  514. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +9 -0
  515. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
  516. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +7 -0
  517. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +6 -0
  518. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  519. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  520. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  521. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
  522. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +6 -0
  523. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +6 -0
  524. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  525. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  526. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  527. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  528. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  529. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
  530. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +76 -0
  531. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  532. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  533. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
  534. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +7 -0
  535. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +9 -0
  536. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +12 -0
  537. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
  538. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  539. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  540. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  541. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/mini.gif +0 -0
  542. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/noimage.png +0 -0
  543. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites.png +0 -0
  544. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  545. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  546. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +7 -0
  547. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +6 -0
  548. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +9 -0
  549. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +13 -0
  550. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
  551. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  552. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  553. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  554. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/mini.gif +0 -0
  555. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/noimage.png +0 -0
  556. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites.png +0 -0
  557. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  558. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +6 -0
  559. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +6 -0
  560. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +8 -0
  561. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +12 -0
  562. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
  563. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  564. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  565. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  566. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/mini.gif +0 -0
  567. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/noimage.png +0 -0
  568. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites.png +0 -0
  569. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  570. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  571. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +6 -0
  572. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +6 -0
  573. data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +8 -0
  574. data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +83 -0
  575. data/spec/spec.opts +6 -0
  576. data/spec/spec_helper.rb +36 -0
  577. metadata +658 -0
@@ -0,0 +1,1022 @@
1
+ /*
2
+ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ (function()
7
+ {
8
+ function removeRawAttribute( $node, attr )
9
+ {
10
+ if ( CKEDITOR.env.ie )
11
+ $node.removeAttribute( attr );
12
+ else
13
+ delete $node[ attr ];
14
+ }
15
+
16
+ var cellNodeRegex = /^(?:td|th)$/;
17
+
18
+ function getSelectedCells( selection )
19
+ {
20
+ // Walker will try to split text nodes, which will make the current selection
21
+ // invalid. So save bookmarks before doing anything.
22
+ var bookmarks = selection.createBookmarks();
23
+
24
+ var ranges = selection.getRanges();
25
+ var retval = [];
26
+ var database = {};
27
+
28
+ function moveOutOfCellGuard( node )
29
+ {
30
+ // Apply to the first cell only.
31
+ if ( retval.length > 0 )
32
+ return;
33
+
34
+ // If we are exiting from the first </td>, then the td should definitely be
35
+ // included.
36
+ if ( node.type == CKEDITOR.NODE_ELEMENT && cellNodeRegex.test( node.getName() )
37
+ && !node.getCustomData( 'selected_cell' ) )
38
+ {
39
+ CKEDITOR.dom.element.setMarker( database, node, 'selected_cell', true );
40
+ retval.push( node );
41
+ }
42
+ }
43
+
44
+ for ( var i = 0 ; i < ranges.length ; i++ )
45
+ {
46
+ var range = ranges[ i ];
47
+
48
+ if ( range.collapsed )
49
+ {
50
+ // Walker does not handle collapsed ranges yet - fall back to old API.
51
+ var startNode = range.getCommonAncestor();
52
+ var nearestCell = startNode.getAscendant( 'td', true ) || startNode.getAscendant( 'th', true );
53
+ if ( nearestCell )
54
+ retval.push( nearestCell );
55
+ }
56
+ else
57
+ {
58
+ var walker = new CKEDITOR.dom.walker( range );
59
+ var node;
60
+ walker.guard = moveOutOfCellGuard;
61
+
62
+ while ( ( node = walker.next() ) )
63
+ {
64
+ // If may be possible for us to have a range like this:
65
+ // <td>^1</td><td>^2</td>
66
+ // The 2nd td shouldn't be included.
67
+ //
68
+ // So we have to take care to include a td we've entered only when we've
69
+ // walked into its children.
70
+
71
+ var parent = node.getParent();
72
+ if ( parent && cellNodeRegex.test( parent.getName() ) && !parent.getCustomData( 'selected_cell' ) )
73
+ {
74
+ CKEDITOR.dom.element.setMarker( database, parent, 'selected_cell', true );
75
+ retval.push( parent );
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ CKEDITOR.dom.element.clearAllMarkers( database );
82
+
83
+ // Restore selection position.
84
+ selection.selectBookmarks( bookmarks );
85
+
86
+ return retval;
87
+ }
88
+
89
+ function clearRow( $tr )
90
+ {
91
+ // Get the array of row's cells.
92
+ var $cells = $tr.cells;
93
+
94
+ // Empty all cells.
95
+ for ( var i = 0 ; i < $cells.length ; i++ )
96
+ {
97
+ $cells[ i ].innerHTML = '';
98
+
99
+ if ( !CKEDITOR.env.ie )
100
+ ( new CKEDITOR.dom.element( $cells[ i ] ) ).appendBogus();
101
+ }
102
+ }
103
+
104
+ function insertRow( selection, insertBefore )
105
+ {
106
+ // Get the row where the selection is placed in.
107
+ var row = selection.getStartElement().getAscendant( 'tr' );
108
+ if ( !row )
109
+ return;
110
+
111
+ // Create a clone of the row.
112
+ var newRow = row.clone( true );
113
+
114
+ // Insert the new row before of it.
115
+ newRow.insertBefore( row );
116
+
117
+ // Clean one of the rows to produce the illusion of inserting an empty row
118
+ // before or after.
119
+ clearRow( insertBefore ? newRow.$ : row.$ );
120
+ }
121
+
122
+ function deleteRows( selectionOrRow )
123
+ {
124
+ if ( selectionOrRow instanceof CKEDITOR.dom.selection )
125
+ {
126
+ var cells = getSelectedCells( selectionOrRow ),
127
+ cellsCount = cells.length,
128
+ rowsToDelete = [],
129
+ cursorPosition,
130
+ previousRowIndex,
131
+ nextRowIndex;
132
+
133
+ // Queue up the rows - it's possible and likely that we have duplicates.
134
+ for ( var i = 0 ; i < cellsCount ; i++ )
135
+ {
136
+ var row = cells[ i ].getParent(),
137
+ rowIndex = row.$.rowIndex;
138
+
139
+ !i && ( previousRowIndex = rowIndex - 1 );
140
+ rowsToDelete[ rowIndex ] = row;
141
+ i == cellsCount - 1 && ( nextRowIndex = rowIndex + 1 );
142
+ }
143
+
144
+ var table = row.getAscendant( 'table' ),
145
+ rows = table.$.rows,
146
+ rowCount = rows.length;
147
+
148
+ // Where to put the cursor after rows been deleted?
149
+ // 1. Into next sibling row if any;
150
+ // 2. Into previous sibling row if any;
151
+ // 3. Into table's parent element if it's the very last row.
152
+ cursorPosition = new CKEDITOR.dom.element(
153
+ nextRowIndex < rowCount && table.$.rows[ nextRowIndex ] ||
154
+ previousRowIndex > 0 && table.$.rows[ previousRowIndex ] ||
155
+ table.$.parentNode );
156
+
157
+ for ( i = rowsToDelete.length ; i >= 0 ; i-- )
158
+ {
159
+ if ( rowsToDelete[ i ] )
160
+ deleteRows( rowsToDelete[ i ] );
161
+ }
162
+
163
+ return cursorPosition;
164
+ }
165
+ else if ( selectionOrRow instanceof CKEDITOR.dom.element )
166
+ {
167
+ table = selectionOrRow.getAscendant( 'table' );
168
+
169
+ if ( table.$.rows.length == 1 )
170
+ table.remove();
171
+ else
172
+ selectionOrRow.remove();
173
+ }
174
+
175
+ return 0;
176
+ }
177
+
178
+ function insertColumn( selection, insertBefore )
179
+ {
180
+ // Get the cell where the selection is placed in.
181
+ var startElement = selection.getStartElement();
182
+ var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
183
+
184
+ if ( !cell )
185
+ return;
186
+
187
+ // Get the cell's table.
188
+ var table = cell.getAscendant( 'table' );
189
+ var cellIndex = cell.$.cellIndex;
190
+
191
+ // Loop through all rows available in the table.
192
+ for ( var i = 0 ; i < table.$.rows.length ; i++ )
193
+ {
194
+ var $row = table.$.rows[ i ];
195
+
196
+ // If the row doesn't have enough cells, ignore it.
197
+ if ( $row.cells.length < ( cellIndex + 1 ) )
198
+ continue;
199
+
200
+ cell = new CKEDITOR.dom.element( $row.cells[ cellIndex ].cloneNode( false ) );
201
+
202
+ if ( !CKEDITOR.env.ie )
203
+ cell.appendBogus();
204
+
205
+ // Get back the currently selected cell.
206
+ var baseCell = new CKEDITOR.dom.element( $row.cells[ cellIndex ] );
207
+ if ( insertBefore )
208
+ cell.insertBefore( baseCell );
209
+ else
210
+ cell.insertAfter( baseCell );
211
+ }
212
+ }
213
+
214
+ function deleteColumns( selectionOrCell )
215
+ {
216
+ if ( selectionOrCell instanceof CKEDITOR.dom.selection )
217
+ {
218
+ var colsToDelete = getSelectedCells( selectionOrCell );
219
+ for ( var i = colsToDelete.length ; i >= 0 ; i-- )
220
+ {
221
+ if ( colsToDelete[ i ] )
222
+ deleteColumns( colsToDelete[ i ] );
223
+ }
224
+ }
225
+ else if ( selectionOrCell instanceof CKEDITOR.dom.element )
226
+ {
227
+ // Get the cell's table.
228
+ var table = selectionOrCell.getAscendant( 'table' );
229
+
230
+ // Get the cell index.
231
+ var cellIndex = selectionOrCell.$.cellIndex;
232
+
233
+ /*
234
+ * Loop through all rows from down to up, coz it's possible that some rows
235
+ * will be deleted.
236
+ */
237
+ for ( i = table.$.rows.length - 1 ; i >= 0 ; i-- )
238
+ {
239
+ // Get the row.
240
+ var row = new CKEDITOR.dom.element( table.$.rows[ i ] );
241
+
242
+ // If the cell to be removed is the first one and the row has just one cell.
243
+ if ( !cellIndex && row.$.cells.length == 1 )
244
+ {
245
+ deleteRows( row );
246
+ continue;
247
+ }
248
+
249
+ // Else, just delete the cell.
250
+ if ( row.$.cells[ cellIndex ] )
251
+ row.$.removeChild( row.$.cells[ cellIndex ] );
252
+ }
253
+ }
254
+ }
255
+
256
+ function insertCell( selection, insertBefore )
257
+ {
258
+ var startElement = selection.getStartElement();
259
+ var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
260
+
261
+ if ( !cell )
262
+ return;
263
+
264
+ // Create the new cell element to be added.
265
+ var newCell = cell.clone();
266
+ if ( !CKEDITOR.env.ie )
267
+ newCell.appendBogus();
268
+
269
+ if ( insertBefore )
270
+ newCell.insertBefore( cell );
271
+ else
272
+ newCell.insertAfter( cell );
273
+ }
274
+
275
+ function deleteCells( selectionOrCell )
276
+ {
277
+ if ( selectionOrCell instanceof CKEDITOR.dom.selection )
278
+ {
279
+ var cellsToDelete = getSelectedCells( selectionOrCell );
280
+ for ( var i = cellsToDelete.length - 1 ; i >= 0 ; i-- )
281
+ deleteCells( cellsToDelete[ i ] );
282
+ }
283
+ else if ( selectionOrCell instanceof CKEDITOR.dom.element )
284
+ {
285
+ if ( selectionOrCell.getParent().getChildCount() == 1 )
286
+ selectionOrCell.getParent().remove();
287
+ else
288
+ selectionOrCell.remove();
289
+ }
290
+ }
291
+
292
+ // Remove filler at end and empty spaces around the cell content.
293
+ function trimCell( cell )
294
+ {
295
+ var bogus = cell.getBogus();
296
+ bogus && bogus.remove();
297
+ cell.trim();
298
+ }
299
+
300
+ function placeCursorInCell( cell, placeAtEnd )
301
+ {
302
+ var range = new CKEDITOR.dom.range( cell.getDocument() );
303
+ if ( !range[ 'moveToElementEdit' + ( placeAtEnd ? 'End' : 'Start' ) ]( cell ) )
304
+ {
305
+ range.selectNodeContents( cell );
306
+ range.collapse( placeAtEnd ? false : true );
307
+ }
308
+ range.select( true );
309
+ }
310
+
311
+ function buildTableMap( table )
312
+ {
313
+
314
+ var aRows = table.$.rows ;
315
+
316
+ // Row and Column counters.
317
+ var r = -1 ;
318
+
319
+ var aMap = [];
320
+
321
+ for ( var i = 0 ; i < aRows.length ; i++ )
322
+ {
323
+ r++ ;
324
+ !aMap[r] && ( aMap[r] = [] );
325
+
326
+ var c = -1 ;
327
+
328
+ for ( var j = 0 ; j < aRows[i].cells.length ; j++ )
329
+ {
330
+ var oCell = aRows[i].cells[j] ;
331
+
332
+ c++ ;
333
+ while ( aMap[r][c] )
334
+ c++ ;
335
+
336
+ var iColSpan = isNaN( oCell.colSpan ) ? 1 : oCell.colSpan ;
337
+ var iRowSpan = isNaN( oCell.rowSpan ) ? 1 : oCell.rowSpan ;
338
+
339
+ for ( var rs = 0 ; rs < iRowSpan ; rs++ )
340
+ {
341
+ if ( !aMap[r + rs] )
342
+ aMap[r + rs] = new Array() ;
343
+
344
+ for ( var cs = 0 ; cs < iColSpan ; cs++ )
345
+ {
346
+ aMap[r + rs][c + cs] = aRows[i].cells[j] ;
347
+ }
348
+ }
349
+
350
+ c += iColSpan - 1 ;
351
+ }
352
+ }
353
+ return aMap ;
354
+ }
355
+
356
+ function cellInRow( tableMap, rowIndex, cell )
357
+ {
358
+ var oRow = tableMap[ rowIndex ];
359
+ if ( typeof cell == 'undefined' )
360
+ return oRow;
361
+
362
+ for ( var c = 0 ; oRow && c < oRow.length ; c++ )
363
+ {
364
+ if ( cell.is && oRow[c] == cell.$ )
365
+ return c;
366
+ else if ( c == cell )
367
+ return new CKEDITOR.dom.element( oRow[ c ] );
368
+ }
369
+ return cell.is ? -1 : null;
370
+ }
371
+
372
+ function cellInCol( tableMap, colIndex, cell )
373
+ {
374
+ var oCol = [];
375
+ for ( var r = 0; r < tableMap.length; r++ )
376
+ {
377
+ var row = tableMap[ r ];
378
+ if ( typeof cell == 'undefined' )
379
+ oCol.push( row[ colIndex ] );
380
+ else if ( cell.is && row[ colIndex ] == cell.$ )
381
+ return r;
382
+ else if ( r == cell )
383
+ return new CKEDITOR.dom.element( row[ colIndex ] );
384
+ }
385
+
386
+ return ( typeof cell == 'undefined' )? oCol : cell.is ? -1 : null;
387
+ }
388
+
389
+ function mergeCells( selection, mergeDirection, isDetect )
390
+ {
391
+ var cells = getSelectedCells( selection );
392
+
393
+ // Invalid merge request if:
394
+ // 1. In batch mode despite that less than two selected.
395
+ // 2. In solo mode while not exactly only one selected.
396
+ // 3. Cells distributed in different table groups (e.g. from both thead and tbody).
397
+ var commonAncestor;
398
+ if ( ( mergeDirection ? cells.length != 1 : cells.length < 2 )
399
+ || ( commonAncestor = selection.getCommonAncestor() )
400
+ && commonAncestor.type == CKEDITOR.NODE_ELEMENT
401
+ && commonAncestor.is( 'table' ) )
402
+ {
403
+ return false;
404
+ }
405
+
406
+ var cell,
407
+ firstCell = cells[ 0 ],
408
+ table = firstCell.getAscendant( 'table' ),
409
+ map = buildTableMap( table ),
410
+ mapHeight = map.length,
411
+ mapWidth = map[ 0 ].length,
412
+ startRow = firstCell.getParent().$.rowIndex,
413
+ startColumn = cellInRow( map, startRow, firstCell );
414
+
415
+ if ( mergeDirection )
416
+ {
417
+ var targetCell;
418
+ try
419
+ {
420
+ targetCell =
421
+ map[ mergeDirection == 'up' ?
422
+ ( startRow - 1 ):
423
+ mergeDirection == 'down' ? ( startRow + 1 ) : startRow ] [
424
+ mergeDirection == 'left' ?
425
+ ( startColumn - 1 ):
426
+ mergeDirection == 'right' ? ( startColumn + 1 ) : startColumn ];
427
+
428
+ }
429
+ catch( er )
430
+ {
431
+ return false;
432
+ }
433
+
434
+ // 1. No cell could be merged.
435
+ // 2. Same cell actually.
436
+ if ( !targetCell || firstCell.$ == targetCell )
437
+ return false;
438
+
439
+ // Sort in map order regardless of the DOM sequence.
440
+ cells[ ( mergeDirection == 'up' || mergeDirection == 'left' ) ?
441
+ 'unshift' : 'push' ]( new CKEDITOR.dom.element( targetCell ) );
442
+ }
443
+
444
+ // Start from here are merging way ignorance (merge up/right, batch merge).
445
+ var doc = firstCell.getDocument(),
446
+ lastRowIndex = startRow,
447
+ totalRowSpan = 0,
448
+ totalColSpan = 0,
449
+ // Use a documentFragment as buffer when appending cell contents.
450
+ frag = !isDetect && new CKEDITOR.dom.documentFragment( doc ),
451
+ dimension = 0;
452
+
453
+ for ( var i = 0; i < cells.length; i++ )
454
+ {
455
+ cell = cells[ i ];
456
+
457
+ var tr = cell.getParent(),
458
+ cellFirstChild = cell.getFirst(),
459
+ colSpan = cell.$.colSpan,
460
+ rowSpan = cell.$.rowSpan,
461
+ rowIndex = tr.$.rowIndex,
462
+ colIndex = cellInRow( map, rowIndex, cell );
463
+
464
+ // Accumulated the actual places taken by all selected cells.
465
+ dimension += colSpan * rowSpan;
466
+ // Accumulated the maximum virtual spans from column and row.
467
+ totalColSpan = Math.max( totalColSpan, colIndex - startColumn + colSpan ) ;
468
+ totalRowSpan = Math.max( totalRowSpan, rowIndex - startRow + rowSpan );
469
+
470
+ if ( !isDetect )
471
+ {
472
+ // Trim all cell fillers and check to remove empty cells.
473
+ if ( trimCell( cell ), cell.getChildren().count() )
474
+ {
475
+ // Merge vertically cells as two separated paragraphs.
476
+ if ( rowIndex != lastRowIndex
477
+ && cellFirstChild
478
+ && !( cellFirstChild.isBlockBoundary
479
+ && cellFirstChild.isBlockBoundary( { br : 1 } ) ) )
480
+ {
481
+ var last = frag.getLast( CKEDITOR.dom.walker.whitespaces( true ) );
482
+ if ( last && !( last.is && last.is( 'br' ) ) )
483
+ frag.append( new CKEDITOR.dom.element( 'br' ) );
484
+ }
485
+
486
+ cell.moveChildren( frag );
487
+ }
488
+ i ? cell.remove() : cell.setHtml( '' );
489
+ }
490
+ lastRowIndex = rowIndex;
491
+ }
492
+
493
+ if ( !isDetect )
494
+ {
495
+ frag.moveChildren( firstCell );
496
+
497
+ if ( !CKEDITOR.env.ie )
498
+ firstCell.appendBogus();
499
+
500
+ if ( totalColSpan >= mapWidth )
501
+ firstCell.removeAttribute( 'rowSpan' );
502
+ else
503
+ firstCell.$.rowSpan = totalRowSpan;
504
+
505
+ if ( totalRowSpan >= mapHeight )
506
+ firstCell.removeAttribute( 'colSpan' );
507
+ else
508
+ firstCell.$.colSpan = totalColSpan;
509
+
510
+ // Swip empty <tr> left at the end of table due to the merging.
511
+ var trs = new CKEDITOR.dom.nodeList( table.$.rows ),
512
+ count = trs.count();
513
+
514
+ for ( i = count - 1; i >= 0; i-- )
515
+ {
516
+ var tailTr = trs.getItem( i );
517
+ if ( !tailTr.$.cells.length )
518
+ {
519
+ tailTr.remove();
520
+ count++;
521
+ continue;
522
+ }
523
+ }
524
+
525
+ return firstCell;
526
+ }
527
+ // Be able to merge cells only if actual dimension of selected
528
+ // cells equals to the caculated rectangle.
529
+ else
530
+ return ( totalRowSpan * totalColSpan ) == dimension;
531
+ }
532
+
533
+ function verticalSplitCell ( selection, isDetect )
534
+ {
535
+ var cells = getSelectedCells( selection );
536
+ if ( cells.length > 1 )
537
+ return false;
538
+ else if ( isDetect )
539
+ return true;
540
+
541
+ var cell = cells[ 0 ],
542
+ tr = cell.getParent(),
543
+ table = tr.getAscendant( 'table' ),
544
+ map = buildTableMap( table ),
545
+ rowIndex = tr.$.rowIndex,
546
+ colIndex = cellInRow( map, rowIndex, cell ),
547
+ rowSpan = cell.$.rowSpan,
548
+ newCell,
549
+ newRowSpan,
550
+ newCellRowSpan,
551
+ newRowIndex;
552
+
553
+ if ( rowSpan > 1 )
554
+ {
555
+ newRowSpan = Math.ceil( rowSpan / 2 );
556
+ newCellRowSpan = Math.floor( rowSpan / 2 );
557
+ newRowIndex = rowIndex + newRowSpan;
558
+ var newCellTr = new CKEDITOR.dom.element( table.$.rows[ newRowIndex ] ),
559
+ newCellRow = cellInRow( map, newRowIndex ),
560
+ candidateCell;
561
+
562
+ newCell = cell.clone();
563
+
564
+ // Figure out where to insert the new cell by checking the vitual row.
565
+ for ( var c = 0; c < newCellRow.length; c++ )
566
+ {
567
+ candidateCell = newCellRow[ c ];
568
+ // Catch first cell actually following the column.
569
+ if ( candidateCell.parentNode == newCellTr.$
570
+ && c > colIndex )
571
+ {
572
+ newCell.insertBefore( new CKEDITOR.dom.element( candidateCell ) );
573
+ break;
574
+ }
575
+ else
576
+ candidateCell = null;
577
+ }
578
+
579
+ // The destination row is empty, append at will.
580
+ if ( !candidateCell )
581
+ newCellTr.append( newCell, true );
582
+ }
583
+ else
584
+ {
585
+ newCellRowSpan = newRowSpan = 1;
586
+
587
+ newCellTr = tr.clone();
588
+ newCellTr.insertAfter( tr );
589
+ newCellTr.append( newCell = cell.clone() );
590
+
591
+ var cellsInSameRow = cellInRow( map, rowIndex );
592
+ for ( var i = 0; i < cellsInSameRow.length; i++ )
593
+ cellsInSameRow[ i ].rowSpan++;
594
+ }
595
+
596
+ if ( !CKEDITOR.env.ie )
597
+ newCell.appendBogus();
598
+
599
+ cell.$.rowSpan = newRowSpan;
600
+ newCell.$.rowSpan = newCellRowSpan;
601
+ if ( newRowSpan == 1 )
602
+ cell.removeAttribute( 'rowSpan' );
603
+ if ( newCellRowSpan == 1 )
604
+ newCell.removeAttribute( 'rowSpan' );
605
+
606
+ return newCell;
607
+ }
608
+
609
+ function horizontalSplitCell( selection, isDetect )
610
+ {
611
+ var cells = getSelectedCells( selection );
612
+ if ( cells.length > 1 )
613
+ return false;
614
+ else if ( isDetect )
615
+ return true;
616
+
617
+ var cell = cells[ 0 ],
618
+ tr = cell.getParent(),
619
+ table = tr.getAscendant( 'table' ),
620
+ map = buildTableMap( table ),
621
+ rowIndex = tr.$.rowIndex,
622
+ colIndex = cellInRow( map, rowIndex, cell ),
623
+ colSpan = cell.$.colSpan,
624
+ newCell,
625
+ newColSpan,
626
+ newCellColSpan;
627
+
628
+ if ( colSpan > 1 )
629
+ {
630
+ newColSpan = Math.ceil( colSpan / 2 );
631
+ newCellColSpan = Math.floor( colSpan / 2 );
632
+ }
633
+ else
634
+ {
635
+ newCellColSpan = newColSpan = 1;
636
+ var cellsInSameCol = cellInCol( map, colIndex );
637
+ for ( var i = 0; i < cellsInSameCol.length; i++ )
638
+ cellsInSameCol[ i ].colSpan++;
639
+ }
640
+ newCell = cell.clone();
641
+ newCell.insertAfter( cell );
642
+ if ( !CKEDITOR.env.ie )
643
+ newCell.appendBogus();
644
+
645
+ cell.$.colSpan = newColSpan;
646
+ newCell.$.colSpan = newCellColSpan;
647
+ if ( newColSpan == 1 )
648
+ cell.removeAttribute( 'colSpan' );
649
+ if ( newCellColSpan == 1 )
650
+ newCell.removeAttribute( 'colSpan' );
651
+
652
+ return newCell;
653
+ }
654
+ // Context menu on table caption incorrect (#3834)
655
+ var contextMenuTags = { thead : 1, tbody : 1, tfoot : 1, td : 1, tr : 1, th : 1 };
656
+
657
+ CKEDITOR.plugins.tabletools =
658
+ {
659
+ init : function( editor )
660
+ {
661
+ var lang = editor.lang.table;
662
+
663
+ editor.addCommand( 'cellProperties', new CKEDITOR.dialogCommand( 'cellProperties' ) );
664
+ CKEDITOR.dialog.add( 'cellProperties', this.path + 'dialogs/tableCell.js' );
665
+
666
+ editor.addCommand( 'tableDelete',
667
+ {
668
+ exec : function( editor )
669
+ {
670
+ var selection = editor.getSelection();
671
+ var startElement = selection && selection.getStartElement();
672
+ var table = startElement && startElement.getAscendant( 'table', true );
673
+
674
+ if ( !table )
675
+ return;
676
+
677
+ // Maintain the selection point at where the table was deleted.
678
+ selection.selectElement( table );
679
+ var range = selection.getRanges()[0];
680
+ range.collapse();
681
+ selection.selectRanges( [ range ] );
682
+
683
+ // If the table's parent has only one child, remove it as well.
684
+ if ( table.getParent().getChildCount() == 1 )
685
+ table.getParent().remove();
686
+ else
687
+ table.remove();
688
+ }
689
+ } );
690
+
691
+ editor.addCommand( 'rowDelete',
692
+ {
693
+ exec : function( editor )
694
+ {
695
+ var selection = editor.getSelection();
696
+ placeCursorInCell( deleteRows( selection ) );
697
+ }
698
+ } );
699
+
700
+ editor.addCommand( 'rowInsertBefore',
701
+ {
702
+ exec : function( editor )
703
+ {
704
+ var selection = editor.getSelection();
705
+ insertRow( selection, true );
706
+ }
707
+ } );
708
+
709
+ editor.addCommand( 'rowInsertAfter',
710
+ {
711
+ exec : function( editor )
712
+ {
713
+ var selection = editor.getSelection();
714
+ insertRow( selection );
715
+ }
716
+ } );
717
+
718
+ editor.addCommand( 'columnDelete',
719
+ {
720
+ exec : function( editor )
721
+ {
722
+ var selection = editor.getSelection();
723
+ deleteColumns( selection );
724
+ }
725
+ } );
726
+
727
+ editor.addCommand( 'columnInsertBefore',
728
+ {
729
+ exec : function( editor )
730
+ {
731
+ var selection = editor.getSelection();
732
+ insertColumn( selection, true );
733
+ }
734
+ } );
735
+
736
+ editor.addCommand( 'columnInsertAfter',
737
+ {
738
+ exec : function( editor )
739
+ {
740
+ var selection = editor.getSelection();
741
+ insertColumn( selection );
742
+ }
743
+ } );
744
+
745
+ editor.addCommand( 'cellDelete',
746
+ {
747
+ exec : function( editor )
748
+ {
749
+ var selection = editor.getSelection();
750
+ deleteCells( selection );
751
+ }
752
+ } );
753
+
754
+ editor.addCommand( 'cellMerge',
755
+ {
756
+ exec : function( editor )
757
+ {
758
+ placeCursorInCell( mergeCells( editor.getSelection() ), true );
759
+ }
760
+ } );
761
+
762
+ editor.addCommand( 'cellMergeRight',
763
+ {
764
+ exec : function( editor )
765
+ {
766
+ placeCursorInCell( mergeCells( editor.getSelection(), 'right' ), true );
767
+ }
768
+ } );
769
+
770
+ editor.addCommand( 'cellMergeDown',
771
+ {
772
+ exec : function( editor )
773
+ {
774
+ placeCursorInCell( mergeCells( editor.getSelection(), 'down' ), true );
775
+ }
776
+ } );
777
+
778
+ editor.addCommand( 'cellVerticalSplit',
779
+ {
780
+ exec : function( editor )
781
+ {
782
+ placeCursorInCell( verticalSplitCell( editor.getSelection() ) );
783
+ }
784
+ } );
785
+
786
+ editor.addCommand( 'cellHorizontalSplit',
787
+ {
788
+ exec : function( editor )
789
+ {
790
+ placeCursorInCell( horizontalSplitCell( editor.getSelection() ) );
791
+ }
792
+ } );
793
+
794
+ editor.addCommand( 'cellInsertBefore',
795
+ {
796
+ exec : function( editor )
797
+ {
798
+ var selection = editor.getSelection();
799
+ insertCell( selection, true );
800
+ }
801
+ } );
802
+
803
+ editor.addCommand( 'cellInsertAfter',
804
+ {
805
+ exec : function( editor )
806
+ {
807
+ var selection = editor.getSelection();
808
+ insertCell( selection );
809
+ }
810
+ } );
811
+
812
+ // If the "menu" plugin is loaded, register the menu items.
813
+ if ( editor.addMenuItems )
814
+ {
815
+ editor.addMenuItems(
816
+ {
817
+ tablecell :
818
+ {
819
+ label : lang.cell.menu,
820
+ group : 'tablecell',
821
+ order : 1,
822
+ getItems : function()
823
+ {
824
+ var selection = editor.getSelection(),
825
+ cells = getSelectedCells( selection );
826
+ return {
827
+ tablecell_insertBefore : CKEDITOR.TRISTATE_OFF,
828
+ tablecell_insertAfter : CKEDITOR.TRISTATE_OFF,
829
+ tablecell_delete : CKEDITOR.TRISTATE_OFF,
830
+ tablecell_merge : mergeCells( selection, null, true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
831
+ tablecell_merge_right : mergeCells( selection, 'right', true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
832
+ tablecell_merge_down : mergeCells( selection, 'down', true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
833
+ tablecell_split_vertical : verticalSplitCell( selection, true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
834
+ tablecell_split_horizontal : horizontalSplitCell( selection, true ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED,
835
+ tablecell_properties : cells.length > 0 ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED
836
+ };
837
+ }
838
+ },
839
+
840
+ tablecell_insertBefore :
841
+ {
842
+ label : lang.cell.insertBefore,
843
+ group : 'tablecell',
844
+ command : 'cellInsertBefore',
845
+ order : 5
846
+ },
847
+
848
+ tablecell_insertAfter :
849
+ {
850
+ label : lang.cell.insertAfter,
851
+ group : 'tablecell',
852
+ command : 'cellInsertAfter',
853
+ order : 10
854
+ },
855
+
856
+ tablecell_delete :
857
+ {
858
+ label : lang.cell.deleteCell,
859
+ group : 'tablecell',
860
+ command : 'cellDelete',
861
+ order : 15
862
+ },
863
+
864
+ tablecell_merge :
865
+ {
866
+ label : lang.cell.merge,
867
+ group : 'tablecell',
868
+ command : 'cellMerge',
869
+ order : 16
870
+ },
871
+
872
+ tablecell_merge_right :
873
+ {
874
+ label : lang.cell.mergeRight,
875
+ group : 'tablecell',
876
+ command : 'cellMergeRight',
877
+ order : 17
878
+ },
879
+
880
+ tablecell_merge_down :
881
+ {
882
+ label : lang.cell.mergeDown,
883
+ group : 'tablecell',
884
+ command : 'cellMergeDown',
885
+ order : 18
886
+ },
887
+
888
+ tablecell_split_horizontal :
889
+ {
890
+ label : lang.cell.splitHorizontal,
891
+ group : 'tablecell',
892
+ command : 'cellHorizontalSplit',
893
+ order : 19
894
+ },
895
+
896
+ tablecell_split_vertical :
897
+ {
898
+ label : lang.cell.splitVertical,
899
+ group : 'tablecell',
900
+ command : 'cellVerticalSplit',
901
+ order : 20
902
+ },
903
+
904
+ tablecell_properties :
905
+ {
906
+ label : lang.cell.title,
907
+ group : 'tablecellproperties',
908
+ command : 'cellProperties',
909
+ order : 21
910
+ },
911
+
912
+ tablerow :
913
+ {
914
+ label : lang.row.menu,
915
+ group : 'tablerow',
916
+ order : 1,
917
+ getItems : function()
918
+ {
919
+ return {
920
+ tablerow_insertBefore : CKEDITOR.TRISTATE_OFF,
921
+ tablerow_insertAfter : CKEDITOR.TRISTATE_OFF,
922
+ tablerow_delete : CKEDITOR.TRISTATE_OFF
923
+ };
924
+ }
925
+ },
926
+
927
+ tablerow_insertBefore :
928
+ {
929
+ label : lang.row.insertBefore,
930
+ group : 'tablerow',
931
+ command : 'rowInsertBefore',
932
+ order : 5
933
+ },
934
+
935
+ tablerow_insertAfter :
936
+ {
937
+ label : lang.row.insertAfter,
938
+ group : 'tablerow',
939
+ command : 'rowInsertAfter',
940
+ order : 10
941
+ },
942
+
943
+ tablerow_delete :
944
+ {
945
+ label : lang.row.deleteRow,
946
+ group : 'tablerow',
947
+ command : 'rowDelete',
948
+ order : 15
949
+ },
950
+
951
+ tablecolumn :
952
+ {
953
+ label : lang.column.menu,
954
+ group : 'tablecolumn',
955
+ order : 1,
956
+ getItems : function()
957
+ {
958
+ return {
959
+ tablecolumn_insertBefore : CKEDITOR.TRISTATE_OFF,
960
+ tablecolumn_insertAfter : CKEDITOR.TRISTATE_OFF,
961
+ tablecolumn_delete : CKEDITOR.TRISTATE_OFF
962
+ };
963
+ }
964
+ },
965
+
966
+ tablecolumn_insertBefore :
967
+ {
968
+ label : lang.column.insertBefore,
969
+ group : 'tablecolumn',
970
+ command : 'columnInsertBefore',
971
+ order : 5
972
+ },
973
+
974
+ tablecolumn_insertAfter :
975
+ {
976
+ label : lang.column.insertAfter,
977
+ group : 'tablecolumn',
978
+ command : 'columnInsertAfter',
979
+ order : 10
980
+ },
981
+
982
+ tablecolumn_delete :
983
+ {
984
+ label : lang.column.deleteColumn,
985
+ group : 'tablecolumn',
986
+ command : 'columnDelete',
987
+ order : 15
988
+ }
989
+ });
990
+ }
991
+
992
+ // If the "contextmenu" plugin is laoded, register the listeners.
993
+ if ( editor.contextMenu )
994
+ {
995
+ editor.contextMenu.addListener( function( element, selection )
996
+ {
997
+ if ( !element )
998
+ return null;
999
+
1000
+ while ( element )
1001
+ {
1002
+ if ( element.getName() in contextMenuTags )
1003
+ {
1004
+ return {
1005
+ tablecell : CKEDITOR.TRISTATE_OFF,
1006
+ tablerow : CKEDITOR.TRISTATE_OFF,
1007
+ tablecolumn : CKEDITOR.TRISTATE_OFF
1008
+ };
1009
+ }
1010
+ element = element.getParent();
1011
+ }
1012
+
1013
+ return null;
1014
+ } );
1015
+ }
1016
+ },
1017
+
1018
+ getSelectedCells : getSelectedCells
1019
+
1020
+ };
1021
+ CKEDITOR.plugins.add( 'tabletools', CKEDITOR.plugins.tabletools );
1022
+ })();