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,147 @@
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
+ CKEDITOR.plugins.add( 'panelbutton',
7
+ {
8
+ requires : [ 'button' ],
9
+ beforeInit : function( editor )
10
+ {
11
+ editor.ui.addHandler( CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler );
12
+ }
13
+ });
14
+
15
+ /**
16
+ * Button UI element.
17
+ * @constant
18
+ * @example
19
+ */
20
+ CKEDITOR.UI_PANELBUTTON = 4;
21
+
22
+ (function()
23
+ {
24
+ var clickFn = function( editor )
25
+ {
26
+ var _ = this._;
27
+
28
+ if ( _.state == CKEDITOR.TRISTATE_DISABLED )
29
+ return;
30
+
31
+ this.createPanel( editor );
32
+
33
+ if ( _.on )
34
+ {
35
+ _.panel.hide();
36
+ return;
37
+ }
38
+
39
+ _.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 );
40
+ };
41
+
42
+
43
+ CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass(
44
+ {
45
+ base : CKEDITOR.ui.button,
46
+
47
+ $ : function( definition )
48
+ {
49
+ // We don't want the panel definition in this object.
50
+ var panelDefinition = definition.panel;
51
+ delete definition.panel;
52
+
53
+ this.base( definition );
54
+
55
+ this.document = ( panelDefinition
56
+ && panelDefinition.parent
57
+ && panelDefinition.parent.getDocument() )
58
+ || CKEDITOR.document;
59
+
60
+ panelDefinition.block =
61
+ {
62
+ attributes : panelDefinition.attributes
63
+ };
64
+
65
+ this.hasArrow = true;
66
+
67
+ this.click = clickFn;
68
+
69
+ this._ =
70
+ {
71
+ panelDefinition : panelDefinition
72
+ };
73
+ },
74
+
75
+ statics :
76
+ {
77
+ handler :
78
+ {
79
+ create : function( definition )
80
+ {
81
+ return new CKEDITOR.ui.panelButton( definition );
82
+ }
83
+ }
84
+ },
85
+
86
+ proto :
87
+ {
88
+ createPanel : function( editor )
89
+ {
90
+ var _ = this._;
91
+
92
+ if ( _.panel )
93
+ return;
94
+
95
+ var panelDefinition = this._.panelDefinition || {},
96
+ panelBlockDefinition = this._.panelDefinition.block,
97
+ panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(),
98
+ panel = this._.panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ),
99
+ block = panel.addBlock( _.id, panelBlockDefinition ),
100
+ me = this;
101
+
102
+ panel.onShow = function()
103
+ {
104
+ if ( me.className )
105
+ this.element.getFirst().addClass( me.className + '_panel' );
106
+
107
+ _.oldState = me._.state;
108
+ me.setState( CKEDITOR.TRISTATE_ON );
109
+
110
+ _.on = 1;
111
+
112
+ if ( me.onOpen )
113
+ me.onOpen();
114
+ };
115
+
116
+ panel.onHide = function()
117
+ {
118
+ if ( me.className )
119
+ this.element.getFirst().removeClass( me.className + '_panel' );
120
+
121
+ me.setState( _.oldState );
122
+
123
+ _.on = 0;
124
+
125
+ if ( me.onClose )
126
+ me.onClose();
127
+ };
128
+
129
+ panel.onEscape = function()
130
+ {
131
+ panel.hide();
132
+ me.document.getById( _.id ).focus();
133
+ };
134
+
135
+ if ( this.onBlock )
136
+ this.onBlock( panel, block );
137
+
138
+ block.onHide = function()
139
+ {
140
+ _.on = 0;
141
+ me.setState( CKEDITOR.TRISTATE_OFF );
142
+ };
143
+ }
144
+ }
145
+ });
146
+
147
+ })();
@@ -0,0 +1,1179 @@
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
+ var fragmentPrototype = CKEDITOR.htmlParser.fragment.prototype,
9
+ elementPrototype = CKEDITOR.htmlParser.element.prototype;
10
+
11
+ fragmentPrototype.onlyChild = elementPrototype.onlyChild = function()
12
+ {
13
+ var children = this.children,
14
+ count = children.length,
15
+ firstChild = ( count == 1 ) && children[ 0 ];
16
+ return firstChild || null;
17
+ };
18
+
19
+ elementPrototype.removeAnyChildWithName = function( tagName )
20
+ {
21
+ var children = this.children,
22
+ childs = [],
23
+ child;
24
+
25
+ for ( var i = 0; i < children.length; i++ )
26
+ {
27
+ child = children[ i ];
28
+ if ( !child.name )
29
+ continue;
30
+
31
+ if ( child.name == tagName )
32
+ {
33
+ childs.push( child );
34
+ children.splice( i--, 1 );
35
+ }
36
+ childs = childs.concat( child.removeAnyChildWithName( tagName ) );
37
+ }
38
+ return childs;
39
+ };
40
+
41
+ elementPrototype.getAncestor = function( tagNameRegex )
42
+ {
43
+ var parent = this.parent;
44
+ while ( parent && !( parent.name && parent.name.match( tagNameRegex ) ) )
45
+ parent = parent.parent;
46
+ return parent;
47
+ };
48
+
49
+ fragmentPrototype.firstChild = elementPrototype.firstChild = function( evaluator )
50
+ {
51
+ var child;
52
+
53
+ for ( var i = 0 ; i < this.children.length ; i++ )
54
+ {
55
+ child = this.children[ i ];
56
+ if ( evaluator( child ) )
57
+ return child;
58
+ else if ( child.name )
59
+ {
60
+ child = child.firstChild( evaluator );
61
+ if ( child )
62
+ return child;
63
+ else
64
+ continue;
65
+ }
66
+ }
67
+
68
+ return null;
69
+ };
70
+
71
+ // Adding a (set) of styles to the element's attributes.
72
+ elementPrototype.addStyle = function( name, value, isPrepend )
73
+ {
74
+ var styleText, addingStyleText = '';
75
+ // name/value pair.
76
+ if ( typeof value == 'string' )
77
+ addingStyleText += name + ':' + value + ';';
78
+ else
79
+ {
80
+ // style literal.
81
+ if ( typeof name == 'object' )
82
+ {
83
+ for ( var style in name )
84
+ {
85
+ if ( name.hasOwnProperty( style ) )
86
+ addingStyleText += style + ':' + name[ style ] + ';';
87
+ }
88
+ }
89
+ // raw style text form.
90
+ else
91
+ addingStyleText += name;
92
+
93
+ isPrepend = value;
94
+ }
95
+
96
+ if ( !this.attributes )
97
+ this.attributes = {};
98
+
99
+ styleText = this.attributes.style || '';
100
+
101
+ styleText = ( isPrepend ?
102
+ [ addingStyleText, styleText ]
103
+ : [ styleText, addingStyleText ] ).join( ';' );
104
+
105
+ this.attributes.style = styleText.replace( /^;|;(?=;)/, '' );
106
+ };
107
+
108
+ /**
109
+ * Return the DTD-valid parent tag names of the specified one.
110
+ * @param tagName
111
+ */
112
+ CKEDITOR.dtd.parentOf = function( tagName )
113
+ {
114
+ var result = {};
115
+ for ( var tag in this )
116
+ {
117
+ if ( tag.indexOf( '$' ) == -1 && this[ tag ][ tagName ] )
118
+ result[ tag ] = 1;
119
+ }
120
+ return result;
121
+ };
122
+
123
+ var cssLengthRelativeUnit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i;
124
+ var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/;
125
+
126
+ var listBaseIndent = 0,
127
+ previousListItemMargin;
128
+
129
+ CKEDITOR.plugins.pastefromword =
130
+ {
131
+ utils :
132
+ {
133
+ // Create a <cke:listbullet> which indicate an list item type.
134
+ createListBulletMarker : function ( bulletStyle, bulletText )
135
+ {
136
+ var marker = new CKEDITOR.htmlParser.element( 'cke:listbullet' ),
137
+ listType;
138
+
139
+ // TODO: Support more list style type from MS-Word.
140
+ if ( !bulletStyle )
141
+ {
142
+ bulletStyle = 'decimal';
143
+ listType = 'ol';
144
+ }
145
+ else if ( bulletStyle[ 2 ] )
146
+ {
147
+ if ( !isNaN( bulletStyle[ 1 ] ) )
148
+ bulletStyle = 'decimal';
149
+ // No way to distinguish between Roman numerals and Alphas,
150
+ // detect them as a whole.
151
+ else if ( /^[a-z]+$/.test( bulletStyle[ 1 ] ) )
152
+ bulletStyle = 'lower-alpha';
153
+ else if ( /^[A-Z]+$/.test( bulletStyle[ 1 ] ) )
154
+ bulletStyle = 'upper-alpha';
155
+ // Simply use decimal for the rest forms of unrepresentable
156
+ // numerals, e.g. Chinese...
157
+ else
158
+ bulletStyle = 'decimal';
159
+
160
+ listType = 'ol';
161
+ }
162
+ else
163
+ {
164
+ if ( /[l\u00B7\u2002]/.test( bulletStyle[ 1 ] ) ) //l·•
165
+ bulletStyle = 'disc';
166
+ else if ( /[\u006F\u00D8]/.test( bulletStyle[ 1 ] ) ) //oØ
167
+ bulletStyle = 'circle';
168
+ else if ( /[\u006E\u25C6]/.test( bulletStyle[ 1 ] ) ) //n◆
169
+ bulletStyle = 'square';
170
+ else
171
+ bulletStyle = 'disc';
172
+
173
+ listType = 'ul';
174
+ }
175
+
176
+ // Represent list type as CSS style.
177
+ marker.attributes =
178
+ {
179
+ 'cke:listtype' : listType,
180
+ 'style' : 'list-style-type:' + bulletStyle + ';'
181
+ };
182
+ marker.add( new CKEDITOR.htmlParser.text( bulletText ) );
183
+ return marker;
184
+ },
185
+
186
+ isListBulletIndicator : function( element )
187
+ {
188
+ var styleText = element.attributes && element.attributes.style;
189
+ if ( /mso-list\s*:\s*Ignore/i.test( styleText ) )
190
+ return true;
191
+ },
192
+
193
+ isContainingOnlySpaces : function( element )
194
+ {
195
+ var text;
196
+ return ( ( text = element.onlyChild() )
197
+ && ( /^(:?\s|&nbsp;)+$/ ).test( text.value ) );
198
+ },
199
+
200
+ resolveList : function( element )
201
+ {
202
+ // <cke:listbullet> indicate a list item.
203
+ var children = element.children,
204
+ attrs = element.attributes,
205
+ listMarker;
206
+
207
+ if ( ( listMarker = element.removeAnyChildWithName( 'cke:listbullet' ) )
208
+ && listMarker.length
209
+ && ( listMarker = listMarker[ 0 ] ) )
210
+ {
211
+ element.name = 'cke:li';
212
+
213
+ if ( attrs.style )
214
+ {
215
+ attrs.style = CKEDITOR.plugins.pastefromword.filters.stylesFilter(
216
+ [
217
+ // Text-indent is not representing list item level any more.
218
+ [ 'text-indent' ],
219
+ [ 'line-height' ],
220
+ // Resolve indent level from 'margin-left' value.
221
+ [ ( /^margin(:?-left)?$/ ), null, function( margin )
222
+ {
223
+ // Be able to deal with component/short-hand form style.
224
+ var values = margin.split( ' ' );
225
+ margin = values[ 3 ] || values[ 1 ] || values [ 0 ];
226
+ margin = parseInt( margin, 10 );
227
+
228
+ // Figure out the indent unit by looking at the first increament.
229
+ if ( !listBaseIndent && previousListItemMargin && margin > previousListItemMargin )
230
+ listBaseIndent = margin - previousListItemMargin;
231
+
232
+ attrs[ 'cke:margin' ] = previousListItemMargin = margin;
233
+ } ]
234
+ ] )( attrs.style, element ) || '' ;
235
+ }
236
+
237
+ // Inherit list-type-style from bullet.
238
+ var listBulletAttrs = listMarker.attributes,
239
+ listBulletStyle = listBulletAttrs.style;
240
+
241
+ element.addStyle( listBulletStyle );
242
+ CKEDITOR.tools.extend( attrs, listBulletAttrs );
243
+ return true;
244
+ }
245
+
246
+ return false;
247
+ },
248
+
249
+ // Convert various length units to 'px' in ignorance of DPI.
250
+ convertToPx : ( function ()
251
+ {
252
+ var calculator = CKEDITOR.dom.element.createFromHtml(
253
+ '<div style="position:absolute;left:-9999px;' +
254
+ 'top:-9999px;margin:0px;padding:0px;border:0px;"' +
255
+ '></div>', CKEDITOR.document );
256
+ CKEDITOR.document.getBody().append( calculator );
257
+
258
+ return function( cssLength )
259
+ {
260
+ if ( cssLengthRelativeUnit.test( cssLength ) )
261
+ {
262
+ calculator.setStyle( 'width', cssLength );
263
+ return calculator.$.clientWidth + 'px';
264
+ }
265
+
266
+ return cssLength;
267
+ };
268
+ } )(),
269
+
270
+ // Providing a shorthand style then retrieve one or more style component values.
271
+ getStyleComponents : ( function()
272
+ {
273
+ var calculator = CKEDITOR.dom.element.createFromHtml(
274
+ '<div style="position:absolute;left:-9999px;top:-9999px;"></div>',
275
+ CKEDITOR.document );
276
+ CKEDITOR.document.getBody().append( calculator );
277
+
278
+ return function( name, styleValue, fetchList )
279
+ {
280
+ calculator.setStyle( name, styleValue );
281
+ var styles = {},
282
+ count = fetchList.length;
283
+ for ( var i = 0; i < count; i++ )
284
+ styles[ fetchList[ i ] ] = calculator.getStyle( fetchList[ i ] );
285
+
286
+ return styles;
287
+ };
288
+ } )(),
289
+
290
+ listDtdParents : CKEDITOR.dtd.parentOf( 'ol' )
291
+ },
292
+
293
+ filters :
294
+ {
295
+ // Transform a normal list into flat list items only presentation.
296
+ // E.g. <ul><li>level1<ol><li>level2</li></ol></li> =>
297
+ // <cke:li cke:listtype="ul" cke:indent="1">level1</cke:li>
298
+ // <cke:li cke:listtype="ol" cke:indent="2">level2</cke:li>
299
+ flattenList : function( element )
300
+ {
301
+ var attrs = element.attributes,
302
+ parent = element.parent;
303
+
304
+ var listStyleType,
305
+ indentLevel = 1;
306
+
307
+ // Resolve how many level nested.
308
+ while ( parent )
309
+ {
310
+ parent.attributes && parent.attributes[ 'cke:list'] && indentLevel++;
311
+ parent = parent.parent;
312
+ }
313
+
314
+ // All list items are of the same type.
315
+ switch ( attrs.type )
316
+ {
317
+ case 'a' :
318
+ listStyleType = 'lower-alpha';
319
+ break;
320
+ // TODO: Support more list style type from MS-Word.
321
+ }
322
+
323
+ var children = element.children,
324
+ child;
325
+
326
+ for ( var i = 0; i < children.length; i++ )
327
+ {
328
+ child = children[ i ];
329
+ var attributes = child.attributes;
330
+
331
+ if ( child.name in CKEDITOR.dtd.$listItem )
332
+ {
333
+ var listItemChildren = child.children,
334
+ count = listItemChildren.length,
335
+ last = listItemChildren[ count - 1 ];
336
+
337
+ // Move out nested list.
338
+ if ( last.name in CKEDITOR.dtd.$list )
339
+ {
340
+ children.splice( i + 1, 0, last );
341
+ last.parent = element;
342
+
343
+ // Remove the parent list item if it's just a holder.
344
+ if ( !--listItemChildren.length )
345
+ children.splice( i, 1 );
346
+ }
347
+
348
+ child.name = 'cke:li';
349
+ attributes[ 'cke:indent' ] = indentLevel;
350
+ previousListItemMargin = 0;
351
+ attributes[ 'cke:listtype' ] = element.name;
352
+ listStyleType && child.addStyle( 'list-style-type', listStyleType, true );
353
+ }
354
+ }
355
+
356
+ delete element.name;
357
+
358
+ // We're loosing tag name here, signalize this element as a list.
359
+ attrs[ 'cke:list' ] = 1;
360
+ },
361
+
362
+ /**
363
+ * Try to collect all list items among the children and establish one
364
+ * or more HTML list structures for them.
365
+ * @param element
366
+ */
367
+ assembleList : function( element )
368
+ {
369
+ var children = element.children, child,
370
+ listItem, // The current processing cke:li element.
371
+ listItemAttrs,
372
+ listType, // Determine the root type of the list.
373
+ listItemIndent, // Indent level of current list item.
374
+ lastListItem, // The previous one just been added to the list.
375
+ list, parentList, // Current staging list and it's parent list if any.
376
+ indent;
377
+
378
+ for ( var i = 0; i < children.length; i++ )
379
+ {
380
+ child = children[ i ];
381
+
382
+ if ( 'cke:li' == child.name )
383
+ {
384
+ child.name = 'li';
385
+ listItem = child;
386
+ listItemAttrs = listItem.attributes;
387
+ listType = listItem.attributes[ 'cke:listtype' ];
388
+
389
+ // List item indent level might come from a real list indentation or
390
+ // been resolved from a pseudo list item's margin value, even get
391
+ // no indentation at all.
392
+ listItemIndent = parseInt( listItemAttrs[ 'cke:indent' ], 10 )
393
+ || listBaseIndent && ( Math.ceil( listItemAttrs[ 'cke:margin' ] / listBaseIndent ) )
394
+ || 1;
395
+
396
+ // Ignore the 'list-style-type' attribute if it's matched with
397
+ // the list root element's default style type.
398
+ listItemAttrs.style && ( listItemAttrs.style =
399
+ CKEDITOR.plugins.pastefromword.filters.stylesFilter(
400
+ [
401
+ [ 'list-style-type', listType == 'ol' ? 'decimal' : 'disc' ]
402
+ ] )( listItemAttrs.style )
403
+ || '' );
404
+
405
+ if ( !list )
406
+ {
407
+ list = new CKEDITOR.htmlParser.element( listType );
408
+ list.add( listItem );
409
+ children[ i ] = list;
410
+ }
411
+ else
412
+ {
413
+ if ( listItemIndent > indent )
414
+ {
415
+ list = new CKEDITOR.htmlParser.element( listType );
416
+ list.add( listItem );
417
+ lastListItem.add( list );
418
+ }
419
+ else if ( listItemIndent < indent )
420
+ {
421
+ // There might be a negative gap between two list levels. (#4944)
422
+ var diff = indent - listItemIndent,
423
+ parent;
424
+ while ( diff-- && ( parent = list.parent ) )
425
+ list = parent.parent;
426
+
427
+ list.add( listItem );
428
+ }
429
+ else
430
+ list.add( listItem );
431
+
432
+ children.splice( i--, 1 );
433
+ }
434
+
435
+ lastListItem = listItem;
436
+ indent = listItemIndent;
437
+ }
438
+ else
439
+ list = null;
440
+ }
441
+
442
+ listBaseIndent = 0;
443
+ },
444
+
445
+ /**
446
+ * A simple filter which always rejecting.
447
+ */
448
+ falsyFilter : function( value )
449
+ {
450
+ return false;
451
+ },
452
+
453
+ /**
454
+ * A filter dedicated on the 'style' attribute filtering, e.g. dropping/replacing style properties.
455
+ * @param styles {Array} in form of [ styleNameRegexp, styleValueRegexp,
456
+ * newStyleValue/newStyleGenerator, newStyleName ] where only the first
457
+ * parameter is mandatory.
458
+ * @param whitelist {Boolean} Whether the {@param styles} will be considered as a white-list.
459
+ */
460
+ stylesFilter : function( styles, whitelist )
461
+ {
462
+ return function( styleText, element )
463
+ {
464
+ var rules = [];
465
+ // html-encoded quote might be introduced by 'font-family'
466
+ // from MS-Word which confused the following regexp. e.g.
467
+ //'font-family: &quot;Lucida, Console&quot;'
468
+ styleText
469
+ .replace( /&quot;/g, '"' )
470
+ .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
471
+ function( match, name, value )
472
+ {
473
+ name = name.toLowerCase();
474
+ name == 'font-family' && ( value = value.replace( /["']/g, '' ) );
475
+
476
+ var namePattern,
477
+ valuePattern,
478
+ newValue,
479
+ newName;
480
+ for ( var i = 0 ; i < styles.length; i++ )
481
+ {
482
+ if ( styles[ i ] )
483
+ {
484
+ namePattern = styles[ i ][ 0 ];
485
+ valuePattern = styles[ i ][ 1 ];
486
+ newValue = styles[ i ][ 2 ];
487
+ newName = styles[ i ][ 3 ];
488
+
489
+ if ( name.match( namePattern )
490
+ && ( !valuePattern || value.match( valuePattern ) ) )
491
+ {
492
+ name = newName || name;
493
+ whitelist && ( newValue = newValue || value );
494
+
495
+ if ( typeof newValue == 'function' )
496
+ newValue = newValue( value, element, name );
497
+
498
+ // Return an couple indicate both name and value
499
+ // changed.
500
+ if ( newValue && newValue.push )
501
+ name = newValue[ 0 ], newValue = newValue[ 1 ];
502
+
503
+ if ( typeof newValue == 'string' )
504
+ rules.push( [ name, newValue ] );
505
+ return;
506
+ }
507
+ }
508
+ }
509
+
510
+ !whitelist && rules.push( [ name, value ] );
511
+
512
+ });
513
+
514
+ for ( var i = 0 ; i < rules.length ; i++ )
515
+ rules[ i ] = rules[ i ].join( ':' );
516
+ return rules.length ?
517
+ ( rules.join( ';' ) + ';' ) : false;
518
+ };
519
+ },
520
+
521
+ /**
522
+ * Migrate the element by decorate styles on it.
523
+ * @param styleDefiniton
524
+ * @param variables
525
+ */
526
+ elementMigrateFilter : function ( styleDefiniton, variables )
527
+ {
528
+ return function( element )
529
+ {
530
+ var styleDef =
531
+ variables ?
532
+ new CKEDITOR.style( styleDefiniton, variables )._.definition
533
+ : styleDefiniton;
534
+ element.name = styleDef.element;
535
+ CKEDITOR.tools.extend( element.attributes, CKEDITOR.tools.clone( styleDef.attributes ) );
536
+ element.addStyle( CKEDITOR.style.getStyleText( styleDef ) );
537
+ };
538
+ },
539
+
540
+ /**
541
+ * Migrate styles by creating a new nested stylish element.
542
+ * @param styleDefinition
543
+ */
544
+ styleMigrateFilter : function( styleDefinition, variableName )
545
+ {
546
+
547
+ var elementMigrateFilter = this.elementMigrateFilter;
548
+ return function( value, element )
549
+ {
550
+ // Build an stylish element first.
551
+ var styleElement = new CKEDITOR.htmlParser.element( null ),
552
+ variables = {};
553
+
554
+ variables[ variableName ] = value;
555
+ elementMigrateFilter( styleDefinition, variables )( styleElement );
556
+ // Place the new element inside the existing span.
557
+ styleElement.children = element.children;
558
+ element.children = [ styleElement ];
559
+ };
560
+ },
561
+
562
+ /**
563
+ * A filter which remove cke-namespaced-attribute on
564
+ * all none-cke-namespaced elements.
565
+ * @param value
566
+ * @param element
567
+ */
568
+ bogusAttrFilter : function( value, element )
569
+ {
570
+ if ( element.name.indexOf( 'cke:' ) == -1 )
571
+ return false;
572
+ },
573
+
574
+ /**
575
+ * A filter which will be used to apply inline css style according the stylesheet
576
+ * definition rules, is generated lazily when filtering.
577
+ */
578
+ applyStyleFilter : null
579
+
580
+ },
581
+
582
+ getRules : function( editor )
583
+ {
584
+ var dtd = CKEDITOR.dtd,
585
+ blockLike = CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent ),
586
+ config = editor.config,
587
+ filters = this.filters,
588
+ falsyFilter = filters.falsyFilter,
589
+ stylesFilter = filters.stylesFilter,
590
+ elementMigrateFilter = filters.elementMigrateFilter,
591
+ styleMigrateFilter = CKEDITOR.tools.bind( this.filters.styleMigrateFilter, this.filters ),
592
+ bogusAttrFilter = filters.bogusAttrFilter,
593
+ createListBulletMarker = this.utils.createListBulletMarker,
594
+ flattenList = filters.flattenList,
595
+ assembleList = filters.assembleList,
596
+ isListBulletIndicator = this.utils.isListBulletIndicator,
597
+ containsNothingButSpaces = this.utils.isContainingOnlySpaces,
598
+ resolveListItem = this.utils.resolveList,
599
+ convertToPx = this.utils.convertToPx,
600
+ getStyleComponents = this.utils.getStyleComponents,
601
+ listDtdParents = this.utils.listDtdParents,
602
+ removeFontStyles = config.pasteFromWordRemoveFontStyles !== false,
603
+ removeStyles = config.pasteFromWordRemoveStyles !== false;
604
+
605
+ return {
606
+
607
+ elementNames :
608
+ [
609
+ // Remove script, meta and link elements.
610
+ [ ( /meta|link|script/ ), '' ]
611
+ ],
612
+
613
+ root : function( element )
614
+ {
615
+ element.filterChildren();
616
+ assembleList( element );
617
+ },
618
+
619
+ elements :
620
+ {
621
+ '^' : function( element )
622
+ {
623
+ // Transform CSS style declaration to inline style.
624
+ var applyStyleFilter;
625
+ if ( CKEDITOR.env.gecko && ( applyStyleFilter = filters.applyStyleFilter ) )
626
+ applyStyleFilter( element );
627
+ },
628
+
629
+ $ : function( element )
630
+ {
631
+ var tagName = element.name || '',
632
+ attrs = element.attributes;
633
+
634
+ // Convert length unit of width/height on blocks to
635
+ // a more editor-friendly way (px).
636
+ if ( tagName in blockLike
637
+ && attrs.style )
638
+ {
639
+ attrs.style = stylesFilter(
640
+ [ [ ( /^(:?width|height)$/ ), null, convertToPx ] ] )( attrs.style ) || '';
641
+ }
642
+
643
+ // Processing headings.
644
+ if ( tagName.match( /h\d/ ) )
645
+ {
646
+ element.filterChildren();
647
+ // Is the heading actually a list item?
648
+ if ( resolveListItem( element ) )
649
+ return;
650
+
651
+ // Adapt heading styles to editor's convention.
652
+ elementMigrateFilter( config[ 'format_' + tagName ] )( element );
653
+ }
654
+ // Remove inline elements which contain only empty spaces.
655
+ else if ( tagName in dtd.$inline )
656
+ {
657
+ element.filterChildren();
658
+ if ( containsNothingButSpaces( element ) )
659
+ delete element.name;
660
+ }
661
+ // Remove element with ms-office namespace,
662
+ // with it's content preserved, e.g. 'o:p'.
663
+ else if ( tagName.indexOf( ':' ) != -1
664
+ && tagName.indexOf( 'cke' ) == -1 )
665
+ {
666
+ element.filterChildren();
667
+
668
+ // Restore image real link from vml.
669
+ if ( tagName == 'v:imagedata' )
670
+ {
671
+ var href = element.attributes[ 'o:href' ];
672
+ if ( href )
673
+ element.attributes.src = href;
674
+ element.name = 'img';
675
+ return;
676
+ }
677
+ delete element.name;
678
+ }
679
+
680
+ // Assembling list items into a whole list.
681
+ if ( tagName in listDtdParents )
682
+ {
683
+ element.filterChildren();
684
+ assembleList( element );
685
+ }
686
+ },
687
+
688
+ // We'll drop any style sheet, but Firefox conclude
689
+ // certain styles in a single style element, which are
690
+ // required to be changed into inline ones.
691
+ 'style' : function( element )
692
+ {
693
+ if ( CKEDITOR.env.gecko )
694
+ {
695
+ // Grab only the style definition section.
696
+ var styleDefSection = element.onlyChild().value.match( /\/\* Style Definitions \*\/([\s\S]*?)\/\*/ ),
697
+ styleDefText = styleDefSection && styleDefSection[ 1 ],
698
+ rules = {}; // Storing the parsed result.
699
+
700
+ if ( styleDefText )
701
+ {
702
+ styleDefText
703
+ // Remove line-breaks.
704
+ .replace(/[\n\r]/g,'')
705
+ // Extract selectors and style properties.
706
+ .replace( /(.+?)\{(.+?)\}/g,
707
+ function( rule, selectors, styleBlock )
708
+ {
709
+ selectors = selectors.split( ',' );
710
+ var length = selectors.length, selector;
711
+ for ( var i = 0; i < length; i++ )
712
+ {
713
+ // Assume MS-Word mostly generate only simple
714
+ // selector( [Type selector][Class selector]).
715
+ CKEDITOR.tools.trim( selectors[ i ] )
716
+ .replace( /^(\w+)(\.[\w-]+)?$/g,
717
+ function( match, tagName, className )
718
+ {
719
+ tagName = tagName || '*';
720
+ className = className.substring( 1, className.length );
721
+
722
+ // Reject MS-Word Normal styles.
723
+ if ( className.match( /MsoNormal/ ) )
724
+ return;
725
+
726
+ if ( !rules[ tagName ] )
727
+ rules[ tagName ] = {};
728
+ if ( className )
729
+ rules[ tagName ][ className ] = styleBlock;
730
+ else
731
+ rules[ tagName ] = styleBlock;
732
+ } );
733
+ }
734
+ });
735
+
736
+ filters.applyStyleFilter = function( element )
737
+ {
738
+ var name = rules[ '*' ] ? '*' : element.name,
739
+ className = element.attributes && element.attributes[ 'class' ],
740
+ style;
741
+ if ( name in rules )
742
+ {
743
+ style = rules[ name ];
744
+ if ( typeof style == 'object' )
745
+ style = style[ className ];
746
+ // Maintain style rules priorities.
747
+ style && element.addStyle( style, true );
748
+ }
749
+ };
750
+ }
751
+ }
752
+ return false;
753
+ },
754
+
755
+ 'p' : function( element )
756
+ {
757
+ element.filterChildren();
758
+
759
+ var attrs = element.attributes,
760
+ parent = element.parent,
761
+ children = element.children;
762
+
763
+ // Is the paragraph actually a list item?
764
+ if ( resolveListItem( element ) )
765
+ return;
766
+
767
+ // Adapt paragraph formatting to editor's convention
768
+ // according to enter-mode.
769
+ if ( config.enterMode == CKEDITOR.ENTER_BR )
770
+ {
771
+ // We suffer from attribute/style lost in this situation.
772
+ delete element.name;
773
+ element.add( new CKEDITOR.htmlParser.element( 'br' ) );
774
+ }
775
+ else
776
+ elementMigrateFilter( config[ 'format_' + ( config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ] )( element );
777
+ },
778
+
779
+ 'div' : function( element )
780
+ {
781
+ // Aligned table with no text surrounded is represented by a wrapper div, from which
782
+ // table cells inherit as text-align styles, which is wrong.
783
+ // Instead we use a clear-float div after the table to properly achieve the same layout.
784
+ var singleChild = element.onlyChild();
785
+ if ( singleChild && singleChild.name == 'table' )
786
+ {
787
+ var attrs = element.attributes;
788
+ singleChild.attributes = CKEDITOR.tools.extend( singleChild.attributes, attrs );
789
+ attrs.style && singleChild.addStyle( attrs.style );
790
+
791
+ var clearFloatDiv = new CKEDITOR.htmlParser.element( 'div' );
792
+ clearFloatDiv.addStyle( 'clear' ,'both' );
793
+ element.add( clearFloatDiv );
794
+ delete element.name;
795
+ }
796
+ },
797
+
798
+ 'td' : function ( element )
799
+ {
800
+ // 'td' in 'thead' is actually <th>.
801
+ if ( element.getAncestor( 'thead') )
802
+ element.name = 'th';
803
+ },
804
+
805
+ // MS-Word sometimes present list as a mixing of normal list
806
+ // and pseudo-list, normalize the previous ones into pseudo form.
807
+ 'ol' : flattenList,
808
+ 'ul' : flattenList,
809
+ 'dl' : flattenList,
810
+
811
+ 'font' : function( element )
812
+ {
813
+ // IE/Safari: drop the font tag if it comes from list bullet text.
814
+ if ( !CKEDITOR.env.gecko && isListBulletIndicator( element.parent ) )
815
+ {
816
+ delete element.name;
817
+ return;
818
+ }
819
+
820
+ element.filterChildren();
821
+
822
+ var attrs = element.attributes,
823
+ styleText = attrs.style,
824
+ parent = element.parent;
825
+
826
+ if ( 'font' == parent.name ) // Merge nested <font> tags.
827
+ {
828
+ CKEDITOR.tools.extend( parent.attributes,
829
+ element.attributes );
830
+ styleText && parent.addStyle( styleText );
831
+ delete element.name;
832
+ return;
833
+ }
834
+ // Convert the merged into a span with all attributes preserved.
835
+ else
836
+ {
837
+ styleText = styleText || '';
838
+ // IE's having those deprecated attributes, normalize them.
839
+ if ( attrs.color )
840
+ {
841
+ attrs.color != '#000000' && ( styleText += 'color:' + attrs.color + ';' );
842
+ delete attrs.color;
843
+ }
844
+ if ( attrs.face )
845
+ {
846
+ styleText += 'font-family:' + attrs.face + ';';
847
+ delete attrs.face;
848
+ }
849
+ // TODO: Mapping size in ranges of xx-small,
850
+ // x-small, small, medium, large, x-large, xx-large.
851
+ if ( attrs.size )
852
+ {
853
+ styleText += 'font-size:' +
854
+ ( attrs.size > 3 ? 'large'
855
+ : ( attrs.size < 3 ? 'small' : 'medium' ) ) + ';';
856
+ delete attrs.size;
857
+ }
858
+
859
+ element.name = 'span';
860
+ element.addStyle( styleText );
861
+ }
862
+ },
863
+
864
+ 'span' : function( element )
865
+ {
866
+ // IE/Safari: remove the span if it comes from list bullet text.
867
+ if ( !CKEDITOR.env.gecko && isListBulletIndicator( element.parent ) )
868
+ return false;
869
+
870
+ element.filterChildren();
871
+ if ( containsNothingButSpaces( element ) )
872
+ {
873
+ delete element.name;
874
+ return null;
875
+ }
876
+
877
+ // For IE/Safari: List item bullet type is supposed to be indicated by
878
+ // the text of a span with style 'mso-list : Ignore' or an image.
879
+ if ( !CKEDITOR.env.gecko && isListBulletIndicator( element ) )
880
+ {
881
+ var listSymbolNode = element.firstChild( function( node )
882
+ {
883
+ return node.value || node.name == 'img';
884
+ });
885
+
886
+ var listSymbol = listSymbolNode && ( listSymbolNode.value || 'l.' ),
887
+ listType = listSymbol.match( /^([^\s]+?)([.)]?)$/ );
888
+ return createListBulletMarker( listType, listSymbol );
889
+ }
890
+
891
+ // Update the src attribute of image element with href.
892
+ var children = element.children,
893
+ attrs = element.attributes,
894
+ styleText = attrs && attrs.style,
895
+ firstChild = children && children[ 0 ];
896
+
897
+ // Assume MS-Word mostly carry font related styles on <span>,
898
+ // adapting them to editor's convention.
899
+ if ( styleText )
900
+ {
901
+ attrs.style = stylesFilter(
902
+ [
903
+ // Drop 'inline-height' style which make lines overlapping.
904
+ [ 'line-height' ],
905
+ [ ( /^font-family$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'font_style' ], 'family' ) : null ] ,
906
+ [ ( /^font-size$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'fontSize_style' ], 'size' ) : null ] ,
907
+ [ ( /^color$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'colorButton_foreStyle' ], 'color' ) : null ] ,
908
+ [ ( /^background-color$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'colorButton_backStyle' ], 'color' ) : null ]
909
+ ] )( styleText, element ) || '';
910
+ }
911
+
912
+ return null;
913
+ },
914
+
915
+ // Migrate basic style formats to editor configured ones.
916
+ 'b' : elementMigrateFilter( config[ 'coreStyles_bold' ] ),
917
+ 'i' : elementMigrateFilter( config[ 'coreStyles_italic' ] ),
918
+ 'u' : elementMigrateFilter( config[ 'coreStyles_underline' ] ),
919
+ 's' : elementMigrateFilter( config[ 'coreStyles_strike' ] ),
920
+ 'sup' : elementMigrateFilter( config[ 'coreStyles_superscript' ] ),
921
+ 'sub' : elementMigrateFilter( config[ 'coreStyles_subscript' ] ),
922
+ // Editor doesn't support anchor with content currently (#3582),
923
+ // drop such anchors with content preserved.
924
+ 'a' : function( element )
925
+ {
926
+ var attrs = element.attributes;
927
+ if ( attrs && !attrs.href && attrs.name )
928
+ delete element.name;
929
+ },
930
+ 'cke:listbullet' : function( element )
931
+ {
932
+ if ( element.getAncestor( /h\d/ ) && !config.pasteFromWordNumberedHeadingToList )
933
+ delete element.name;
934
+ }
935
+ },
936
+
937
+ attributeNames :
938
+ [
939
+ // Remove onmouseover and onmouseout events (from MS Word comments effect)
940
+ [ ( /^onmouse(:?out|over)/ ), '' ],
941
+ // Onload on image element.
942
+ [ ( /^onload$/ ), '' ],
943
+ // Remove office and vml attribute from elements.
944
+ [ ( /(?:v|o):\w+/ ), '' ],
945
+ // Remove lang/language attributes.
946
+ [ ( /^lang/ ), '' ]
947
+ ],
948
+
949
+ attributes :
950
+ {
951
+ 'style' : stylesFilter(
952
+ removeStyles ?
953
+ // Provide a white-list of styles that we preserve, those should
954
+ // be the ones that could later be altered with editor tools.
955
+ [
956
+ // Preserve margin-left/right which used as default indent style in the editor.
957
+ [ ( /^margin$|^margin-(?!bottom|top)/ ), null, function( value, element, name )
958
+ {
959
+ if ( element.name in { p : 1, div : 1 } )
960
+ {
961
+ var indentStyleName = config.contentsLangDirection == 'ltr' ?
962
+ 'margin-left' : 'margin-right';
963
+
964
+ // Extract component value from 'margin' shorthand.
965
+ if ( name == 'margin' )
966
+ {
967
+ value = getStyleComponents( name, value,
968
+ [ indentStyleName ] )[ indentStyleName ];
969
+ }
970
+ else if ( name != indentStyleName )
971
+ return null;
972
+
973
+ if ( value && !emptyMarginRegex.test( value ) )
974
+ return [ indentStyleName, value ];
975
+ }
976
+
977
+ return null;
978
+ } ],
979
+
980
+ // Preserve clear float style.
981
+ [ ( /^clear$/ ) ],
982
+
983
+ [ ( /^border.*|margin.*|vertical-align|float$/ ), null,
984
+ function( value, element )
985
+ {
986
+ if ( element.name == 'img' )
987
+ return value;
988
+ } ],
989
+
990
+ [ (/^width|height$/ ), null,
991
+ function( value, element )
992
+ {
993
+ if ( element.name in { table : 1, td : 1, th : 1, img : 1 } )
994
+ return value;
995
+ } ]
996
+ ] :
997
+ // Otherwise provide a black-list of styles that we remove.
998
+ [
999
+ [ ( /^mso-/ ) ],
1000
+ // Fixing color values.
1001
+ [ ( /-color$/ ), null, function( value )
1002
+ {
1003
+ if ( value == 'transparent' )
1004
+ return false;
1005
+ if ( CKEDITOR.env.gecko )
1006
+ return value.replace( /-moz-use-text-color/g, 'transparent' );
1007
+ } ],
1008
+ // Remove empty margin values, e.g. 0.00001pt 0em 0pt
1009
+ [ ( /^margin$/ ), emptyMarginRegex ],
1010
+ [ 'text-indent', '0cm' ],
1011
+ [ 'page-break-before' ],
1012
+ [ 'tab-stops' ],
1013
+ [ 'display', 'none' ],
1014
+ removeFontStyles ? [ ( /font-?/ ) ] : null
1015
+ ], removeStyles ),
1016
+
1017
+ // Prefer width styles over 'width' attributes.
1018
+ 'width' : function( value, element )
1019
+ {
1020
+ if ( element.name in dtd.$tableContent )
1021
+ return false;
1022
+ },
1023
+ // Prefer border styles over table 'border' attributes.
1024
+ 'border' : function( value, element )
1025
+ {
1026
+ if ( element.name in dtd.$tableContent )
1027
+ return false;
1028
+ },
1029
+
1030
+ // Only Firefox carry style sheet from MS-Word, which
1031
+ // will be applied by us manually. For other browsers
1032
+ // the css className is useless.
1033
+ 'class' : falsyFilter,
1034
+
1035
+ // MS-Word always generate 'background-color' along with 'bgcolor',
1036
+ // simply drop the deprecated attributes.
1037
+ 'bgcolor' : falsyFilter,
1038
+
1039
+ // Deprecate 'valign' attribute in favor of 'vertical-align'.
1040
+ 'valign' : removeStyles ? falsyFilter : function( value, element )
1041
+ {
1042
+ element.addStyle( 'vertical-align', value );
1043
+ return false;
1044
+ }
1045
+ },
1046
+
1047
+ // Fore none-IE, some useful data might be buried under these IE-conditional
1048
+ // comments where RegExp were the right approach to dig them out where usual approach
1049
+ // is transform it into a fake element node which hold the desired data.
1050
+ comment :
1051
+ !CKEDITOR.env.ie ?
1052
+ function( value, node )
1053
+ {
1054
+ var imageInfo = value.match( /<img.*?>/ ),
1055
+ listInfo = value.match( /^\[if !supportLists\]([\s\S]*?)\[endif\]$/ );
1056
+
1057
+ // Seek for list bullet indicator.
1058
+ if ( listInfo )
1059
+ {
1060
+ // Bullet symbol could be either text or an image.
1061
+ var listSymbol = listInfo[ 1 ] || ( imageInfo && 'l.' ),
1062
+ listType = listSymbol && listSymbol.match( />([^\s]+?)([.)]?)</ );
1063
+ return createListBulletMarker( listType, listSymbol );
1064
+ }
1065
+
1066
+ // Reveal the <img> element in conditional comments for Firefox.
1067
+ if ( CKEDITOR.env.gecko && imageInfo )
1068
+ {
1069
+ var img = CKEDITOR.htmlParser.fragment.fromHtml( imageInfo[ 0 ] ).children[ 0 ],
1070
+ previousComment = node.previous,
1071
+ // Try to dig the real image link from vml markup from previous comment text.
1072
+ imgSrcInfo = previousComment && previousComment.value.match( /<v:imagedata[^>]*o:href=['"](.*?)['"]/ ),
1073
+ imgSrc = imgSrcInfo && imgSrcInfo[ 1 ];
1074
+
1075
+ // Is there a real 'src' url to be used?
1076
+ imgSrc && ( img.attributes.src = imgSrc );
1077
+ return img;
1078
+ }
1079
+
1080
+ return false;
1081
+ }
1082
+ : falsyFilter
1083
+ };
1084
+ }
1085
+ };
1086
+
1087
+ // The paste processor here is just a reduced copy of html data processor.
1088
+ var pasteProcessor = function()
1089
+ {
1090
+ this.dataFilter = new CKEDITOR.htmlParser.filter();
1091
+ };
1092
+
1093
+ pasteProcessor.prototype =
1094
+ {
1095
+ toHtml : function( data )
1096
+ {
1097
+ var fragment = CKEDITOR.htmlParser.fragment.fromHtml( data, false ),
1098
+ writer = new CKEDITOR.htmlParser.basicWriter();
1099
+
1100
+ fragment.writeHtml( writer, this.dataFilter );
1101
+ return writer.getHtml( true );
1102
+ }
1103
+ };
1104
+
1105
+ CKEDITOR.cleanWord = function( data, editor )
1106
+ {
1107
+ // Firefox will be confused by those downlevel-revealed IE conditional
1108
+ // comments, fixing them first( convert it to upperlevel-revealed one ).
1109
+ // e.g. <![if !vml]>...<![endif]>
1110
+ if ( CKEDITOR.env.gecko )
1111
+ data = data.replace( /(<!--\[if[^<]*?\])-->([\S\s]*?)<!--(\[endif\]-->)/gi, '$1$2$3' );
1112
+
1113
+ var dataProcessor = new pasteProcessor(),
1114
+ dataFilter = dataProcessor.dataFilter;
1115
+
1116
+ // These rules will have higher priorities than default ones.
1117
+ dataFilter.addRules( CKEDITOR.plugins.pastefromword.getRules( editor ) );
1118
+
1119
+ // Allow extending data filter rules.
1120
+ editor.fire( 'beforeCleanWord', { filter : dataFilter } );
1121
+
1122
+ try
1123
+ {
1124
+ data = dataProcessor.toHtml( data, false );
1125
+ }
1126
+ catch ( e )
1127
+ {
1128
+ alert( editor.lang.pastefromword.error );
1129
+ }
1130
+
1131
+ /* Below post processing those things that are unable to delivered by filter rules. */
1132
+
1133
+ // Remove 'cke' namespaced attribute used in filter rules as marker.
1134
+ data = data.replace( /cke:.*?".*?"/g, '' );
1135
+
1136
+ // Remove empty style attribute.
1137
+ data = data.replace( /style=""/g, '' );
1138
+
1139
+ // Remove the dummy spans ( having no inline style ).
1140
+ data = data.replace( /<span>/g, '' );
1141
+
1142
+ return data;
1143
+ };
1144
+ })();
1145
+
1146
+ /**
1147
+ * Whether to ignore all font related formatting styles, including:
1148
+ * <ul> <li>font size;</li>
1149
+ * <li>font family;</li>
1150
+ * <li>font foreground/background color.</li></ul>
1151
+ * @name CKEDITOR.config.pasteFromWordRemoveFontStyles
1152
+ * @since 3.1
1153
+ * @type Boolean
1154
+ * @default true
1155
+ * @example
1156
+ * config.pasteFromWordRemoveFontStyles = false;
1157
+ */
1158
+
1159
+ /**
1160
+ * Whether to transform MS Word outline numbered headings into lists.
1161
+ * @name CKEDITOR.config.pasteFromWordNumberedHeadingToList
1162
+ * @since 3.1
1163
+ * @type Boolean
1164
+ * @default false
1165
+ * @example
1166
+ * config.pasteFromWordNumberedHeadingToList = true;
1167
+ */
1168
+
1169
+ /**
1170
+ * Whether to remove element styles that can't be managed with the editor. Note
1171
+ * that this doesn't handle the font specific styles, which depends on the
1172
+ * {@link CKEDITOR.config.pasteFromWordRemoveFontStyles} setting instead.
1173
+ * @name CKEDITOR.config.pasteFromWordRemoveStyles
1174
+ * @since 3.1
1175
+ * @type Boolean
1176
+ * @default true
1177
+ * @example
1178
+ * config.pasteFromWordRemoveStyles = false;
1179
+ */