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,29 @@
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
+ /**
7
+ * @file Special Character plugin
8
+ */
9
+
10
+ CKEDITOR.plugins.add( 'specialchar',
11
+ {
12
+ init : function( editor )
13
+ {
14
+ var pluginName = 'specialchar';
15
+
16
+ // Register the dialog.
17
+ CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );
18
+
19
+ // Register the command.
20
+ editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );
21
+
22
+ // Register the toolbar button.
23
+ editor.ui.addButton( 'SpecialChar',
24
+ {
25
+ label : editor.lang.specialChar.toolbar,
26
+ command : pluginName
27
+ });
28
+ }
29
+ } );
@@ -0,0 +1,1258 @@
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( 'styles',
7
+ {
8
+ requires : [ 'selection' ]
9
+ });
10
+
11
+ /**
12
+ * Registers a function to be called whenever a style changes its state in the
13
+ * editing area. The current state is passed to the function. The possible
14
+ * states are {@link CKEDITOR.TRISTATE_ON} and {@link CKEDITOR.TRISTATE_OFF}.
15
+ * @param {CKEDITOR.style} The style to be watched.
16
+ * @param {Function} The function to be called when the style state changes.
17
+ * @example
18
+ * // Create a style object for the <b> element.
19
+ * var style = new CKEDITOR.style( { element : 'b' } );
20
+ * var editor = CKEDITOR.instances.editor1;
21
+ * editor.attachStyleStateChange( style, function( state )
22
+ * {
23
+ * if ( state == CKEDITOR.TRISTATE_ON )
24
+ * alert( 'The current state for the B element is ON' );
25
+ * else
26
+ * alert( 'The current state for the B element is OFF' );
27
+ * });
28
+ */
29
+ CKEDITOR.editor.prototype.attachStyleStateChange = function( style, callback )
30
+ {
31
+ // Try to get the list of attached callbacks.
32
+ var styleStateChangeCallbacks = this._.styleStateChangeCallbacks;
33
+
34
+ // If it doesn't exist, it means this is the first call. So, let's create
35
+ // all the structure to manage the style checks and the callback calls.
36
+ if ( !styleStateChangeCallbacks )
37
+ {
38
+ // Create the callbacks array.
39
+ styleStateChangeCallbacks = this._.styleStateChangeCallbacks = [];
40
+
41
+ // Attach to the selectionChange event, so we can check the styles at
42
+ // that point.
43
+ this.on( 'selectionChange', function( ev )
44
+ {
45
+ // Loop throw all registered callbacks.
46
+ for ( var i = 0 ; i < styleStateChangeCallbacks.length ; i++ )
47
+ {
48
+ var callback = styleStateChangeCallbacks[ i ];
49
+
50
+ // Check the current state for the style defined for that
51
+ // callback.
52
+ var currentState = callback.style.checkActive( ev.data.path ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF;
53
+
54
+ // If the state changed since the last check.
55
+ if ( callback.state !== currentState )
56
+ {
57
+ // Call the callback function, passing the current
58
+ // state to it.
59
+ callback.fn.call( this, currentState );
60
+
61
+ // Save the current state, so it can be compared next
62
+ // time.
63
+ callback.state !== currentState;
64
+ }
65
+ }
66
+ });
67
+ }
68
+
69
+ // Save the callback info, so it can be checked on the next occurence of
70
+ // selectionChange.
71
+ styleStateChangeCallbacks.push( { style : style, fn : callback } );
72
+ };
73
+
74
+ CKEDITOR.STYLE_BLOCK = 1;
75
+ CKEDITOR.STYLE_INLINE = 2;
76
+ CKEDITOR.STYLE_OBJECT = 3;
77
+
78
+ (function()
79
+ {
80
+ var blockElements = { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 };
81
+ var objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1 };
82
+
83
+ var semicolonFixRegex = /\s*(?:;\s*|$)/;
84
+
85
+ CKEDITOR.style = function( styleDefinition, variablesValues )
86
+ {
87
+ if ( variablesValues )
88
+ {
89
+ styleDefinition = CKEDITOR.tools.clone( styleDefinition );
90
+
91
+ replaceVariables( styleDefinition.attributes, variablesValues );
92
+ replaceVariables( styleDefinition.styles, variablesValues );
93
+ }
94
+
95
+ var element = this.element = ( styleDefinition.element || '*' ).toLowerCase();
96
+
97
+ this.type =
98
+ ( element == '#' || blockElements[ element ] ) ?
99
+ CKEDITOR.STYLE_BLOCK
100
+ : objectElements[ element ] ?
101
+ CKEDITOR.STYLE_OBJECT
102
+ :
103
+ CKEDITOR.STYLE_INLINE;
104
+
105
+ this._ =
106
+ {
107
+ definition : styleDefinition
108
+ };
109
+ };
110
+
111
+ CKEDITOR.style.prototype =
112
+ {
113
+ apply : function( document )
114
+ {
115
+ applyStyle.call( this, document, false );
116
+ },
117
+
118
+ remove : function( document )
119
+ {
120
+ applyStyle.call( this, document, true );
121
+ },
122
+
123
+ applyToRange : function( range )
124
+ {
125
+ return ( this.applyToRange =
126
+ this.type == CKEDITOR.STYLE_INLINE ?
127
+ applyInlineStyle
128
+ : this.type == CKEDITOR.STYLE_BLOCK ?
129
+ applyBlockStyle
130
+ : null ).call( this, range );
131
+ },
132
+
133
+ removeFromRange : function( range )
134
+ {
135
+ return ( this.removeFromRange =
136
+ this.type == CKEDITOR.STYLE_INLINE ?
137
+ removeInlineStyle
138
+ : null ).call( this, range );
139
+ },
140
+
141
+ applyToObject : function( element )
142
+ {
143
+ setupElement( element, this );
144
+ },
145
+
146
+ /**
147
+ * Get the style state inside an element path. Returns "true" if the
148
+ * element is active in the path.
149
+ */
150
+ checkActive : function( elementPath )
151
+ {
152
+ switch ( this.type )
153
+ {
154
+ case CKEDITOR.STYLE_BLOCK :
155
+ return this.checkElementRemovable( elementPath.block || elementPath.blockLimit, true );
156
+
157
+ case CKEDITOR.STYLE_INLINE :
158
+
159
+ var elements = elementPath.elements;
160
+
161
+ for ( var i = 0, element ; i < elements.length ; i++ )
162
+ {
163
+ element = elements[i];
164
+
165
+ if ( element == elementPath.block || element == elementPath.blockLimit )
166
+ continue;
167
+
168
+ if ( this.checkElementRemovable( element, true ) )
169
+ return true;
170
+ }
171
+ }
172
+ return false;
173
+ },
174
+
175
+ // Checks if an element, or any of its attributes, is removable by the
176
+ // current style definition.
177
+ checkElementRemovable : function( element, fullMatch )
178
+ {
179
+ if ( !element )
180
+ return false;
181
+
182
+ var def = this._.definition,
183
+ attribs;
184
+
185
+ // If the element name is the same as the style name.
186
+ if ( element.getName() == this.element )
187
+ {
188
+ // If no attributes are defined in the element.
189
+ if ( !fullMatch && !element.hasAttributes() )
190
+ return true;
191
+
192
+ attribs = getAttributesForComparison( def );
193
+
194
+ if ( attribs._length )
195
+ {
196
+ for ( var attName in attribs )
197
+ {
198
+ if ( attName == '_length' )
199
+ continue;
200
+
201
+ var elementAttr = element.getAttribute( attName ) || '';
202
+ if ( attribs[ attName ] ==
203
+ ( attName == 'style' ?
204
+ normalizeCssText( elementAttr, false ) : elementAttr ) )
205
+ {
206
+ if ( !fullMatch )
207
+ return true;
208
+ }
209
+ else if ( fullMatch )
210
+ return false;
211
+ }
212
+ if ( fullMatch )
213
+ return true;
214
+ }
215
+ else
216
+ return true;
217
+ }
218
+
219
+ // Check if the element can be somehow overriden.
220
+ var override = getOverrides( this )[ element.getName() ] ;
221
+ if ( override )
222
+ {
223
+ // If no attributes have been defined, remove the element.
224
+ if ( !( attribs = override.attributes ) )
225
+ return true;
226
+
227
+ for ( var i = 0 ; i < attribs.length ; i++ )
228
+ {
229
+ attName = attribs[i][0];
230
+ var actualAttrValue = element.getAttribute( attName );
231
+ if ( actualAttrValue )
232
+ {
233
+ var attValue = attribs[i][1];
234
+
235
+ // Remove the attribute if:
236
+ // - The override definition value is null;
237
+ // - The override definition value is a string that
238
+ // matches the attribute value exactly.
239
+ // - The override definition value is a regex that
240
+ // has matches in the attribute value.
241
+ if ( attValue === null ||
242
+ ( typeof attValue == 'string' && actualAttrValue == attValue ) ||
243
+ attValue.test( actualAttrValue ) )
244
+ return true;
245
+ }
246
+ }
247
+ }
248
+ return false;
249
+ }
250
+ };
251
+
252
+ // Build the cssText based on the styles definition.
253
+ CKEDITOR.style.getStyleText = function( styleDefinition )
254
+ {
255
+ // If we have already computed it, just return it.
256
+ var stylesDef = styleDefinition._ST;
257
+ if ( stylesDef )
258
+ return stylesDef;
259
+
260
+ stylesDef = styleDefinition.styles;
261
+
262
+ // Builds the StyleText.
263
+
264
+ var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '';
265
+
266
+ if ( stylesText.length )
267
+ stylesText = stylesText.replace( semicolonFixRegex, ';' );
268
+
269
+ for ( var style in stylesDef )
270
+ stylesText += ( style + ':' + stylesDef[ style ] ).replace( semicolonFixRegex, ';' );
271
+
272
+ // Browsers make some changes to the style when applying them. So, here
273
+ // we normalize it to the browser format.
274
+ if ( stylesText.length )
275
+ stylesText = normalizeCssText( stylesText );
276
+
277
+ // Return it, saving it to the next request.
278
+ return ( styleDefinition._ST = stylesText );
279
+ };
280
+
281
+ function applyInlineStyle( range )
282
+ {
283
+ var document = range.document;
284
+
285
+ if ( range.collapsed )
286
+ {
287
+ // Create the element to be inserted in the DOM.
288
+ var collapsedElement = getElement( this, document );
289
+
290
+ // Insert the empty element into the DOM at the range position.
291
+ range.insertNode( collapsedElement );
292
+
293
+ // Place the selection right inside the empty element.
294
+ range.moveToPosition( collapsedElement, CKEDITOR.POSITION_BEFORE_END );
295
+
296
+ return;
297
+ }
298
+
299
+ var elementName = this.element;
300
+ var def = this._.definition;
301
+ var isUnknownElement;
302
+
303
+ // Get the DTD definition for the element. Defaults to "span".
304
+ var dtd = CKEDITOR.dtd[ elementName ] || ( isUnknownElement = true, CKEDITOR.dtd.span );
305
+
306
+ // Bookmark the range so we can re-select it after processing.
307
+ var bookmark = range.createBookmark();
308
+
309
+ // Expand the range.
310
+ range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
311
+ range.trim();
312
+
313
+ // Get the first node to be processed and the last, which concludes the
314
+ // processing.
315
+ var boundaryNodes = range.getBoundaryNodes();
316
+ var firstNode = boundaryNodes.startNode;
317
+ var lastNode = boundaryNodes.endNode.getNextSourceNode( true );
318
+
319
+ // Probably the document end is reached, we need a marker node.
320
+ if ( !lastNode )
321
+ {
322
+ var marker;
323
+ lastNode = marker = document.createText( '' );
324
+ lastNode.insertAfter( range.endContainer );
325
+ }
326
+ // The detection algorithm below skips the contents inside bookmark nodes, so
327
+ // we'll need to make sure lastNode isn't the &nbsp; inside a bookmark node.
328
+ var lastParent = lastNode.getParent();
329
+ if ( lastParent && lastParent.getAttribute( '_fck_bookmark' ) )
330
+ lastNode = lastParent;
331
+
332
+ if ( lastNode.equals( firstNode ) )
333
+ {
334
+ // If the last node is the same as the the first one, we must move
335
+ // it to the next one, otherwise the first one will not be
336
+ // processed.
337
+ lastNode = lastNode.getNextSourceNode( true );
338
+
339
+ // It may happen that there are no more nodes after it (the end of
340
+ // the document), so we must add something there to make our code
341
+ // simpler.
342
+ if ( !lastNode )
343
+ {
344
+ lastNode = marker = document.createText( '' );
345
+ lastNode.insertAfter( firstNode );
346
+ }
347
+ }
348
+
349
+ var currentNode = firstNode;
350
+
351
+ var styleRange;
352
+
353
+ // Indicates that that some useful inline content has been found, so
354
+ // the style should be applied.
355
+ var hasContents;
356
+
357
+ while ( currentNode )
358
+ {
359
+ var applyStyle = false;
360
+
361
+ if ( currentNode.equals( lastNode ) )
362
+ {
363
+ currentNode = null;
364
+ applyStyle = true;
365
+ }
366
+ else
367
+ {
368
+ var nodeType = currentNode.type;
369
+ var nodeName = nodeType == CKEDITOR.NODE_ELEMENT ? currentNode.getName() : null;
370
+
371
+ if ( nodeName && currentNode.getAttribute( '_fck_bookmark' ) )
372
+ {
373
+ currentNode = currentNode.getNextSourceNode( true );
374
+ continue;
375
+ }
376
+
377
+ // Check if the current node can be a child of the style element.
378
+ if ( !nodeName || ( dtd[ nodeName ]
379
+ && ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
380
+ && ( !def.childRule || def.childRule( currentNode ) ) ) )
381
+ {
382
+ var currentParent = currentNode.getParent();
383
+
384
+ // Check if the style element can be a child of the current
385
+ // node parent or if the element is not defined in the DTD.
386
+ if ( currentParent
387
+ && ( ( currentParent.getDtd() || CKEDITOR.dtd.span )[ elementName ] || isUnknownElement )
388
+ && ( !def.parentRule || def.parentRule( currentParent ) ) )
389
+ {
390
+ // This node will be part of our range, so if it has not
391
+ // been started, place its start right before the node.
392
+ // In the case of an element node, it will be included
393
+ // only if it is entirely inside the range.
394
+ if ( !styleRange && ( !nodeName || !CKEDITOR.dtd.$removeEmpty[ nodeName ] || ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED ) ) )
395
+ {
396
+ styleRange = new CKEDITOR.dom.range( document );
397
+ styleRange.setStartBefore( currentNode );
398
+ }
399
+
400
+ // Non element nodes, or empty elements can be added
401
+ // completely to the range.
402
+ if ( nodeType == CKEDITOR.NODE_TEXT || ( nodeType == CKEDITOR.NODE_ELEMENT && !currentNode.getChildCount() ) )
403
+ {
404
+ var includedNode = currentNode;
405
+ var parentNode;
406
+
407
+ // This node is about to be included completelly, but,
408
+ // if this is the last node in its parent, we must also
409
+ // check if the parent itself can be added completelly
410
+ // to the range.
411
+ while ( !includedNode.$.nextSibling
412
+ && ( parentNode = includedNode.getParent(), dtd[ parentNode.getName() ] )
413
+ && ( parentNode.getPosition( firstNode ) | CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_FOLLOWING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
414
+ && ( !def.childRule || def.childRule( parentNode ) ) )
415
+ {
416
+ includedNode = parentNode;
417
+ }
418
+
419
+ styleRange.setEndAfter( includedNode );
420
+
421
+ // If the included node still is the last node in its
422
+ // parent, it means that the parent can't be included
423
+ // in this style DTD, so apply the style immediately.
424
+ if ( !includedNode.$.nextSibling )
425
+ applyStyle = true;
426
+
427
+ if ( !hasContents )
428
+ hasContents = ( nodeType != CKEDITOR.NODE_TEXT || (/[^\s\ufeff]/).test( currentNode.getText() ) );
429
+ }
430
+ }
431
+ else
432
+ applyStyle = true;
433
+ }
434
+ else
435
+ applyStyle = true;
436
+
437
+ // Get the next node to be processed.
438
+ currentNode = currentNode.getNextSourceNode();
439
+ }
440
+
441
+ // Apply the style if we have something to which apply it.
442
+ if ( applyStyle && hasContents && styleRange && !styleRange.collapsed )
443
+ {
444
+ // Build the style element, based on the style object definition.
445
+ var styleNode = getElement( this, document );
446
+
447
+ // Get the element that holds the entire range.
448
+ var parent = styleRange.getCommonAncestor();
449
+
450
+ // Loop through the parents, removing the redundant attributes
451
+ // from the element to be applied.
452
+ while ( styleNode && parent )
453
+ {
454
+ if ( parent.getName() == elementName )
455
+ {
456
+ for ( var attName in def.attributes )
457
+ {
458
+ if ( styleNode.getAttribute( attName ) == parent.getAttribute( attName ) )
459
+ styleNode.removeAttribute( attName );
460
+ }
461
+
462
+ for ( var styleName in def.styles )
463
+ {
464
+ if ( styleNode.getStyle( styleName ) == parent.getStyle( styleName ) )
465
+ styleNode.removeStyle( styleName );
466
+ }
467
+
468
+ if ( !styleNode.hasAttributes() )
469
+ {
470
+ styleNode = null;
471
+ break;
472
+ }
473
+ }
474
+
475
+ parent = parent.getParent();
476
+ }
477
+
478
+ if ( styleNode )
479
+ {
480
+ // Move the contents of the range to the style element.
481
+ styleRange.extractContents().appendTo( styleNode );
482
+
483
+ // Here we do some cleanup, removing all duplicated
484
+ // elements from the style element.
485
+ removeFromInsideElement( this, styleNode );
486
+
487
+ // Insert it into the range position (it is collapsed after
488
+ // extractContents.
489
+ styleRange.insertNode( styleNode );
490
+
491
+ // Let's merge our new style with its neighbors, if possible.
492
+ mergeSiblings( styleNode );
493
+
494
+ // As the style system breaks text nodes constantly, let's normalize
495
+ // things for performance.
496
+ // With IE, some paragraphs get broken when calling normalize()
497
+ // repeatedly. Also, for IE, we must normalize body, not documentElement.
498
+ // IE is also known for having a "crash effect" with normalize().
499
+ // We should try to normalize with IE too in some way, somewhere.
500
+ if ( !CKEDITOR.env.ie )
501
+ styleNode.$.normalize();
502
+ }
503
+
504
+ // Style applied, let's release the range, so it gets
505
+ // re-initialization in the next loop.
506
+ styleRange = null;
507
+ }
508
+ }
509
+
510
+ // Remove the temporary marking node.(#4111)
511
+ marker && marker.remove();
512
+ range.moveToBookmark( bookmark );
513
+ }
514
+
515
+ function removeInlineStyle( range )
516
+ {
517
+ /*
518
+ * Make sure our range has included all "collpased" parent inline nodes so
519
+ * that our operation logic can be simpler.
520
+ */
521
+ range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
522
+
523
+ var bookmark = range.createBookmark(),
524
+ startNode = bookmark.startNode;
525
+
526
+ if ( range.collapsed )
527
+ {
528
+
529
+ var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
530
+ // The topmost element in elementspatch which we should jump out of.
531
+ boundaryElement;
532
+
533
+
534
+ for ( var i = 0, element ; i < startPath.elements.length
535
+ && ( element = startPath.elements[i] ) ; i++ )
536
+ {
537
+ /*
538
+ * 1. If it's collaped inside text nodes, try to remove the style from the whole element.
539
+ *
540
+ * 2. Otherwise if it's collapsed on element boundaries, moving the selection
541
+ * outside the styles instead of removing the whole tag,
542
+ * also make sure other inner styles were well preserverd.(#3309)
543
+ */
544
+ if ( element == startPath.block || element == startPath.blockLimit )
545
+ break;
546
+
547
+ if ( this.checkElementRemovable( element ) )
548
+ {
549
+ var endOfElement = range.checkBoundaryOfElement( element, CKEDITOR.END ),
550
+ startOfElement = !endOfElement && range.checkBoundaryOfElement( element, CKEDITOR.START );
551
+ if ( startOfElement || endOfElement )
552
+ {
553
+ boundaryElement = element;
554
+ boundaryElement.match = startOfElement ? 'start' : 'end';
555
+ }
556
+ else
557
+ {
558
+ /*
559
+ * Before removing the style node, there may be a sibling to the style node
560
+ * that's exactly the same to the one to be removed. To the user, it makes
561
+ * no difference that they're separate entities in the DOM tree. So, merge
562
+ * them before removal.
563
+ */
564
+ mergeSiblings( element );
565
+ removeFromElement( this, element );
566
+
567
+ }
568
+ }
569
+ }
570
+
571
+ // Re-create the style tree after/before the boundary element,
572
+ // the replication start from bookmark start node to define the
573
+ // new range.
574
+ if ( boundaryElement )
575
+ {
576
+ var clonedElement = startNode;
577
+ for ( i = 0 ;; i++ )
578
+ {
579
+ var newElement = startPath.elements[ i ];
580
+ if ( newElement.equals( boundaryElement ) )
581
+ break;
582
+ // Avoid copying any matched element.
583
+ else if ( newElement.match )
584
+ continue;
585
+ else
586
+ newElement = newElement.clone();
587
+ newElement.append( clonedElement );
588
+ clonedElement = newElement;
589
+ }
590
+ clonedElement[ boundaryElement.match == 'start' ?
591
+ 'insertBefore' : 'insertAfter' ]( boundaryElement );
592
+ }
593
+ }
594
+ else
595
+ {
596
+ /*
597
+ * Now our range isn't collapsed. Lets walk from the start node to the end
598
+ * node via DFS and remove the styles one-by-one.
599
+ */
600
+ var endNode = bookmark.endNode,
601
+ me = this;
602
+
603
+ /*
604
+ * Find out the style ancestor that needs to be broken down at startNode
605
+ * and endNode.
606
+ */
607
+ function breakNodes()
608
+ {
609
+ var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
610
+ endPath = new CKEDITOR.dom.elementPath( endNode.getParent() ),
611
+ breakStart = null,
612
+ breakEnd = null;
613
+ for ( var i = 0 ; i < startPath.elements.length ; i++ )
614
+ {
615
+ var element = startPath.elements[ i ];
616
+
617
+ if ( element == startPath.block || element == startPath.blockLimit )
618
+ break;
619
+
620
+ if ( me.checkElementRemovable( element ) )
621
+ breakStart = element;
622
+ }
623
+ for ( i = 0 ; i < endPath.elements.length ; i++ )
624
+ {
625
+ element = endPath.elements[ i ];
626
+
627
+ if ( element == endPath.block || element == endPath.blockLimit )
628
+ break;
629
+
630
+ if ( me.checkElementRemovable( element ) )
631
+ breakEnd = element;
632
+ }
633
+
634
+ if ( breakEnd )
635
+ endNode.breakParent( breakEnd );
636
+ if ( breakStart )
637
+ startNode.breakParent( breakStart );
638
+ }
639
+ breakNodes();
640
+
641
+ // Now, do the DFS walk.
642
+ var currentNode = startNode.getNext();
643
+ while ( !currentNode.equals( endNode ) )
644
+ {
645
+ /*
646
+ * Need to get the next node first because removeFromElement() can remove
647
+ * the current node from DOM tree.
648
+ */
649
+ var nextNode = currentNode.getNextSourceNode();
650
+ if ( currentNode.type == CKEDITOR.NODE_ELEMENT && this.checkElementRemovable( currentNode ) )
651
+ {
652
+ // Remove style from element or overriding element.
653
+ if ( currentNode.getName() == this.element )
654
+ removeFromElement( this, currentNode );
655
+ else
656
+ removeOverrides( currentNode, getOverrides( this )[ currentNode.getName() ] );
657
+
658
+ /*
659
+ * removeFromElement() may have merged the next node with something before
660
+ * the startNode via mergeSiblings(). In that case, the nextNode would
661
+ * contain startNode and we'll have to call breakNodes() again and also
662
+ * reassign the nextNode to something after startNode.
663
+ */
664
+ if ( nextNode.type == CKEDITOR.NODE_ELEMENT && nextNode.contains( startNode ) )
665
+ {
666
+ breakNodes();
667
+ nextNode = startNode.getNext();
668
+ }
669
+ }
670
+ currentNode = nextNode;
671
+ }
672
+ }
673
+
674
+ range.moveToBookmark( bookmark );
675
+ }
676
+
677
+ function applyBlockStyle( range )
678
+ {
679
+ // Serializible bookmarks is needed here since
680
+ // elements may be merged.
681
+ var bookmark = range.createBookmark( true );
682
+
683
+ var iterator = range.createIterator();
684
+ iterator.enforceRealBlocks = true;
685
+
686
+ var block;
687
+ var doc = range.document;
688
+ var previousPreBlock;
689
+
690
+ while ( ( block = iterator.getNextParagraph() ) ) // Only one =
691
+ {
692
+ var newBlock = getElement( this, doc );
693
+ replaceBlock( block, newBlock );
694
+ }
695
+
696
+ range.moveToBookmark( bookmark );
697
+ }
698
+
699
+ // Replace the original block with new one, with special treatment
700
+ // for <pre> blocks to make sure content format is well preserved, and merging/splitting adjacent
701
+ // when necessary.(#3188)
702
+ function replaceBlock( block, newBlock )
703
+ {
704
+ var newBlockIsPre = newBlock.is( 'pre' );
705
+ var blockIsPre = block.is( 'pre' );
706
+
707
+ var isToPre = newBlockIsPre && !blockIsPre;
708
+ var isFromPre = !newBlockIsPre && blockIsPre;
709
+
710
+ if ( isToPre )
711
+ newBlock = toPre( block, newBlock );
712
+ else if ( isFromPre )
713
+ // Split big <pre> into pieces before start to convert.
714
+ newBlock = fromPres( splitIntoPres( block ), newBlock );
715
+ else
716
+ block.moveChildren( newBlock );
717
+
718
+ newBlock.replace( block );
719
+
720
+ if ( newBlockIsPre )
721
+ {
722
+ // Merge previous <pre> blocks.
723
+ mergePre( newBlock );
724
+ }
725
+ }
726
+
727
+ /**
728
+ * Merge a <pre> block with a previous sibling if available.
729
+ */
730
+ function mergePre( preBlock )
731
+ {
732
+ var previousBlock;
733
+ if ( !( ( previousBlock = preBlock.getPreviousSourceNode( true, CKEDITOR.NODE_ELEMENT ) )
734
+ && previousBlock.is
735
+ && previousBlock.is( 'pre') ) )
736
+ return;
737
+
738
+ // Merge the previous <pre> block contents into the current <pre>
739
+ // block.
740
+ //
741
+ // Another thing to be careful here is that currentBlock might contain
742
+ // a '\n' at the beginning, and previousBlock might contain a '\n'
743
+ // towards the end. These new lines are not normally displayed but they
744
+ // become visible after merging.
745
+ var mergedHtml = replace( previousBlock.getHtml(), /\n$/, '' ) + '\n\n' +
746
+ replace( preBlock.getHtml(), /^\n/, '' ) ;
747
+
748
+ // Krugle: IE normalizes innerHTML from <pre>, breaking whitespaces.
749
+ if ( CKEDITOR.env.ie )
750
+ preBlock.$.outerHTML = '<pre>' + mergedHtml + '</pre>';
751
+ else
752
+ preBlock.setHtml( mergedHtml );
753
+
754
+ previousBlock.remove();
755
+ }
756
+
757
+ /**
758
+ * Split into multiple <pre> blocks separated by double line-break.
759
+ * @param preBlock
760
+ */
761
+ function splitIntoPres( preBlock )
762
+ {
763
+ // Exclude the ones at header OR at tail,
764
+ // and ignore bookmark content between them.
765
+ var duoBrRegex = /(\S\s*)\n(?:\s|(<span[^>]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,
766
+ blockName = preBlock.getName(),
767
+ splitedHtml = replace( preBlock.getOuterHtml(),
768
+ duoBrRegex,
769
+ function( match, charBefore, bookmark )
770
+ {
771
+ return charBefore + '</pre>' + bookmark + '<pre>';
772
+ } );
773
+
774
+ var pres = [];
775
+ splitedHtml.replace( /<pre>([\s\S]*?)<\/pre>/gi, function( match, preContent ){
776
+ pres.push( preContent );
777
+ } );
778
+ return pres;
779
+ }
780
+
781
+ // Wrapper function of String::replace without considering of head/tail bookmarks nodes.
782
+ function replace( str, regexp, replacement )
783
+ {
784
+ var headBookmark = '',
785
+ tailBookmark = '';
786
+
787
+ str = str.replace( /(^<span[^>]+_fck_bookmark.*?\/span>)|(<span[^>]+_fck_bookmark.*?\/span>$)/gi,
788
+ function( str, m1, m2 ){
789
+ m1 && ( headBookmark = m1 );
790
+ m2 && ( tailBookmark = m2 );
791
+ return '';
792
+ } );
793
+ return headBookmark + str.replace( regexp, replacement ) + tailBookmark;
794
+ }
795
+ /**
796
+ * Converting a list of <pre> into blocks with format well preserved.
797
+ */
798
+ function fromPres( preHtmls, newBlock )
799
+ {
800
+ var docFrag = new CKEDITOR.dom.documentFragment( newBlock.getDocument() );
801
+ for ( var i = 0 ; i < preHtmls.length ; i++ )
802
+ {
803
+ var blockHtml = preHtmls[ i ];
804
+
805
+ // 1. Trim the first and last line-breaks immediately after and before <pre>,
806
+ // they're not visible.
807
+ blockHtml = blockHtml.replace( /(\r\n|\r)/g, '\n' ) ;
808
+ blockHtml = replace( blockHtml, /^[ \t]*\n/, '' ) ;
809
+ blockHtml = replace( blockHtml, /\n$/, '' ) ;
810
+ // 2. Convert spaces or tabs at the beginning or at the end to &nbsp;
811
+ blockHtml = replace( blockHtml, /^[ \t]+|[ \t]+$/g, function( match, offset, s )
812
+ {
813
+ if ( match.length == 1 ) // one space, preserve it
814
+ return '&nbsp;' ;
815
+ else if ( !offset ) // beginning of block
816
+ return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' ';
817
+ else // end of block
818
+ return ' ' + CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 );
819
+ } ) ;
820
+
821
+ // 3. Convert \n to <BR>.
822
+ // 4. Convert contiguous (i.e. non-singular) spaces or tabs to &nbsp;
823
+ blockHtml = blockHtml.replace( /\n/g, '<br>' ) ;
824
+ blockHtml = blockHtml.replace( /[ \t]{2,}/g,
825
+ function ( match )
826
+ {
827
+ return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' ' ;
828
+ } ) ;
829
+
830
+ var newBlockClone = newBlock.clone();
831
+ newBlockClone.setHtml( blockHtml );
832
+ docFrag.append( newBlockClone );
833
+ }
834
+ return docFrag;
835
+ }
836
+
837
+ /**
838
+ * Converting from a non-PRE block to a PRE block in formatting operations.
839
+ */
840
+ function toPre( block, newBlock )
841
+ {
842
+ // First trim the block content.
843
+ var preHtml = block.getHtml();
844
+
845
+ // 1. Trim head/tail spaces, they're not visible.
846
+ preHtml = replace( preHtml, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, '' );
847
+ // 2. Delete ANSI whitespaces immediately before and after <BR> because
848
+ // they are not visible.
849
+ preHtml = preHtml.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '$1' );
850
+ // 3. Compress other ANSI whitespaces since they're only visible as one
851
+ // single space previously.
852
+ // 4. Convert &nbsp; to spaces since &nbsp; is no longer needed in <PRE>.
853
+ preHtml = preHtml.replace( /([ \t\n\r]+|&nbsp;)/g, ' ' );
854
+ // 5. Convert any <BR /> to \n. This must not be done earlier because
855
+ // the \n would then get compressed.
856
+ preHtml = preHtml.replace( /<br\b[^>]*>/gi, '\n' );
857
+
858
+ // Krugle: IE normalizes innerHTML to <pre>, breaking whitespaces.
859
+ if ( CKEDITOR.env.ie )
860
+ {
861
+ var temp = block.getDocument().createElement( 'div' );
862
+ temp.append( newBlock );
863
+ newBlock.$.outerHTML = '<pre>' + preHtml + '</pre>';
864
+ newBlock = temp.getFirst().remove();
865
+ }
866
+ else
867
+ newBlock.setHtml( preHtml );
868
+
869
+ return newBlock;
870
+ }
871
+
872
+ // Removes a style from an element itself, don't care about its subtree.
873
+ function removeFromElement( style, element )
874
+ {
875
+ var def = style._.definition,
876
+ attributes = def.attributes,
877
+ styles = def.styles,
878
+ overrides = getOverrides( style );
879
+
880
+ function removeAttrs()
881
+ {
882
+ for ( var attName in attributes )
883
+ {
884
+ // The 'class' element value must match (#1318).
885
+ if ( attName == 'class' && element.getAttribute( attName ) != attributes[ attName ] )
886
+ continue;
887
+ element.removeAttribute( attName );
888
+ }
889
+ }
890
+
891
+ // Remove definition attributes/style from the elemnt.
892
+ removeAttrs();
893
+ for ( var styleName in styles )
894
+ element.removeStyle( styleName );
895
+
896
+ // Now remove override styles on the element.
897
+ attributes = overrides[ element.getName() ];
898
+ if ( attributes )
899
+ removeAttrs();
900
+ removeNoAttribsElement( element );
901
+ }
902
+
903
+ // Removes a style from inside an element.
904
+ function removeFromInsideElement( style, element )
905
+ {
906
+ var def = style._.definition,
907
+ attribs = def.attributes,
908
+ styles = def.styles,
909
+ overrides = getOverrides( style );
910
+
911
+ var innerElements = element.getElementsByTag( style.element );
912
+
913
+ for ( var i = innerElements.count(); --i >= 0 ; )
914
+ removeFromElement( style, innerElements.getItem( i ) );
915
+
916
+ // Now remove any other element with different name that is
917
+ // defined to be overriden.
918
+ for ( var overrideElement in overrides )
919
+ {
920
+ if ( overrideElement != style.element )
921
+ {
922
+ innerElements = element.getElementsByTag( overrideElement ) ;
923
+ for ( i = innerElements.count() - 1 ; i >= 0 ; i-- )
924
+ {
925
+ var innerElement = innerElements.getItem( i );
926
+ removeOverrides( innerElement, overrides[ overrideElement ] ) ;
927
+ }
928
+ }
929
+ }
930
+
931
+ }
932
+
933
+ /**
934
+ * Remove overriding styles/attributes from the specific element.
935
+ * Note: Remove the element if no attributes remain.
936
+ * @param {Object} element
937
+ * @param {Object} overrides
938
+ */
939
+ function removeOverrides( element, overrides )
940
+ {
941
+ var attributes = overrides && overrides.attributes ;
942
+
943
+ if ( attributes )
944
+ {
945
+ for ( var i = 0 ; i < attributes.length ; i++ )
946
+ {
947
+ var attName = attributes[i][0], actualAttrValue ;
948
+
949
+ if ( ( actualAttrValue = element.getAttribute( attName ) ) )
950
+ {
951
+ var attValue = attributes[i][1] ;
952
+
953
+ // Remove the attribute if:
954
+ // - The override definition value is null ;
955
+ // - The override definition valie is a string that
956
+ // matches the attribute value exactly.
957
+ // - The override definition value is a regex that
958
+ // has matches in the attribute value.
959
+ if ( attValue === null ||
960
+ ( attValue.test && attValue.test( actualAttrValue ) ) ||
961
+ ( typeof attValue == 'string' && actualAttrValue == attValue ) )
962
+ element.removeAttribute( attName ) ;
963
+ }
964
+ }
965
+ }
966
+
967
+ removeNoAttribsElement( element );
968
+ }
969
+
970
+ // If the element has no more attributes, remove it.
971
+ function removeNoAttribsElement( element )
972
+ {
973
+ // If no more attributes remained in the element, remove it,
974
+ // leaving its children.
975
+ if ( !element.hasAttributes() )
976
+ {
977
+ // Removing elements may open points where merging is possible,
978
+ // so let's cache the first and last nodes for later checking.
979
+ var firstChild = element.getFirst();
980
+ var lastChild = element.getLast();
981
+
982
+ element.remove( true );
983
+
984
+ if ( firstChild )
985
+ {
986
+ // Check the cached nodes for merging.
987
+ mergeSiblings( firstChild );
988
+
989
+ if ( lastChild && !firstChild.equals( lastChild ) )
990
+ mergeSiblings( lastChild );
991
+ }
992
+ }
993
+ }
994
+
995
+ function mergeSiblings( element )
996
+ {
997
+ if ( !element || element.type != CKEDITOR.NODE_ELEMENT || !CKEDITOR.dtd.$removeEmpty[ element.getName() ] )
998
+ return;
999
+
1000
+ mergeElements( element, element.getNext(), true );
1001
+ mergeElements( element, element.getPrevious() );
1002
+ }
1003
+
1004
+ function mergeElements( element, sibling, isNext )
1005
+ {
1006
+ if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT )
1007
+ {
1008
+ var hasBookmark = sibling.getAttribute( '_fck_bookmark' );
1009
+
1010
+ if ( hasBookmark )
1011
+ sibling = isNext ? sibling.getNext() : sibling.getPrevious();
1012
+
1013
+ if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT && element.isIdentical( sibling ) )
1014
+ {
1015
+ // Save the last child to be checked too, to merge things like
1016
+ // <b><i></i></b><b><i></i></b> => <b><i></i></b>
1017
+ var innerSibling = isNext ? element.getLast() : element.getFirst();
1018
+
1019
+ if ( hasBookmark )
1020
+ ( isNext ? sibling.getPrevious() : sibling.getNext() ).move( element, !isNext );
1021
+
1022
+ sibling.moveChildren( element, !isNext );
1023
+ sibling.remove();
1024
+
1025
+ // Now check the last inner child (see two comments above).
1026
+ if ( innerSibling )
1027
+ mergeSiblings( innerSibling );
1028
+ }
1029
+ }
1030
+ }
1031
+
1032
+ function getElement( style, targetDocument )
1033
+ {
1034
+ var el;
1035
+
1036
+ var def = style._.definition;
1037
+
1038
+ var elementName = style.element;
1039
+
1040
+ // The "*" element name will always be a span for this function.
1041
+ if ( elementName == '*' )
1042
+ elementName = 'span';
1043
+
1044
+ // Create the element.
1045
+ el = new CKEDITOR.dom.element( elementName, targetDocument );
1046
+
1047
+ return setupElement( el, style );
1048
+ }
1049
+
1050
+ function setupElement( el, style )
1051
+ {
1052
+ var def = style._.definition;
1053
+ var attributes = def.attributes;
1054
+ var styles = CKEDITOR.style.getStyleText( def );
1055
+
1056
+ // Assign all defined attributes.
1057
+ if ( attributes )
1058
+ {
1059
+ for ( var att in attributes )
1060
+ {
1061
+ el.setAttribute( att, attributes[ att ] );
1062
+ }
1063
+ }
1064
+
1065
+ // Assign all defined styles.
1066
+ if ( styles )
1067
+ el.setAttribute( 'style', styles );
1068
+
1069
+ return el;
1070
+ }
1071
+
1072
+ var varRegex = /#\((.+?)\)/g;
1073
+ function replaceVariables( list, variablesValues )
1074
+ {
1075
+ for ( var item in list )
1076
+ {
1077
+ list[ item ] = list[ item ].replace( varRegex, function( match, varName )
1078
+ {
1079
+ return variablesValues[ varName ];
1080
+ });
1081
+ }
1082
+ }
1083
+
1084
+
1085
+ // Returns an object that can be used for style matching comparison.
1086
+ // Attributes names and values are all lowercased, and the styles get
1087
+ // merged with the style attribute.
1088
+ function getAttributesForComparison( styleDefinition )
1089
+ {
1090
+ // If we have already computed it, just return it.
1091
+ var attribs = styleDefinition._AC;
1092
+ if ( attribs )
1093
+ return attribs;
1094
+
1095
+ attribs = {};
1096
+
1097
+ var length = 0;
1098
+
1099
+ // Loop through all defined attributes.
1100
+ var styleAttribs = styleDefinition.attributes;
1101
+ if ( styleAttribs )
1102
+ {
1103
+ for ( var styleAtt in styleAttribs )
1104
+ {
1105
+ length++;
1106
+ attribs[ styleAtt ] = styleAttribs[ styleAtt ];
1107
+ }
1108
+ }
1109
+
1110
+ // Includes the style definitions.
1111
+ var styleText = CKEDITOR.style.getStyleText( styleDefinition );
1112
+ if ( styleText )
1113
+ {
1114
+ if ( !attribs[ 'style' ] )
1115
+ length++;
1116
+ attribs[ 'style' ] = styleText;
1117
+ }
1118
+
1119
+ // Appends the "length" information to the object.
1120
+ attribs._length = length;
1121
+
1122
+ // Return it, saving it to the next request.
1123
+ return ( styleDefinition._AC = attribs );
1124
+ }
1125
+
1126
+ /**
1127
+ * Get the the collection used to compare the elements and attributes,
1128
+ * defined in this style overrides, with other element. All information in
1129
+ * it is lowercased.
1130
+ * @param {CKEDITOR.style} style
1131
+ */
1132
+ function getOverrides( style )
1133
+ {
1134
+ if ( style._.overrides )
1135
+ return style._.overrides;
1136
+
1137
+ var overrides = ( style._.overrides = {} ),
1138
+ definition = style._.definition.overrides;
1139
+
1140
+ if ( definition )
1141
+ {
1142
+ // The override description can be a string, object or array.
1143
+ // Internally, well handle arrays only, so transform it if needed.
1144
+ if ( !CKEDITOR.tools.isArray( definition ) )
1145
+ definition = [ definition ];
1146
+
1147
+ // Loop through all override definitions.
1148
+ for ( var i = 0 ; i < definition.length ; i++ )
1149
+ {
1150
+ var override = definition[i];
1151
+ var elementName;
1152
+ var overrideEl;
1153
+ var attrs;
1154
+
1155
+ // If can be a string with the element name.
1156
+ if ( typeof override == 'string' )
1157
+ elementName = override.toLowerCase();
1158
+ // Or an object.
1159
+ else
1160
+ {
1161
+ elementName = override.element ? override.element.toLowerCase() : style.element;
1162
+ attrs = override.attributes;
1163
+ }
1164
+
1165
+ // We can have more than one override definition for the same
1166
+ // element name, so we attempt to simply append information to
1167
+ // it if it already exists.
1168
+ overrideEl = overrides[ elementName ] || ( overrides[ elementName ] = {} );
1169
+
1170
+ if ( attrs )
1171
+ {
1172
+ // The returning attributes list is an array, because we
1173
+ // could have different override definitions for the same
1174
+ // attribute name.
1175
+ var overrideAttrs = ( overrideEl.attributes = overrideEl.attributes || new Array() );
1176
+ for ( var attName in attrs )
1177
+ {
1178
+ // Each item in the attributes array is also an array,
1179
+ // where [0] is the attribute name and [1] is the
1180
+ // override value.
1181
+ overrideAttrs.push( [ attName.toLowerCase(), attrs[ attName ] ] );
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+
1187
+ return overrides;
1188
+ }
1189
+
1190
+ function normalizeCssText( unparsedCssText, nativeNormalize )
1191
+ {
1192
+ var styleText;
1193
+ if ( nativeNormalize !== false )
1194
+ {
1195
+ // Injects the style in a temporary span object, so the browser parses it,
1196
+ // retrieving its final format.
1197
+ var temp = new CKEDITOR.dom.element( 'span' );
1198
+ temp.setAttribute( 'style', unparsedCssText );
1199
+ styleText = temp.getAttribute( 'style' ) || '';
1200
+ }
1201
+ else
1202
+ styleText = unparsedCssText;
1203
+
1204
+ // Shrinking white-spaces around colon and semi-colon (#4147).
1205
+ // Compensate tail semi-colon.
1206
+ return styleText.replace( /\s*([;:])\s*/, '$1' )
1207
+ .replace( /([^\s;])$/, '$1;')
1208
+ .replace( /,\s+/g, ',' ) // Trimming spaces after comma (e.g. font-family name)(#4107).
1209
+ .toLowerCase();
1210
+ }
1211
+
1212
+ function applyStyle( document, remove )
1213
+ {
1214
+ // Get all ranges from the selection.
1215
+ var selection = document.getSelection();
1216
+ var ranges = selection.getRanges();
1217
+ var func = remove ? this.removeFromRange : this.applyToRange;
1218
+
1219
+ // Apply the style to the ranges.
1220
+ for ( var i = 0 ; i < ranges.length ; i++ )
1221
+ func.call( this, ranges[ i ] );
1222
+
1223
+ // Select the ranges again.
1224
+ selection.selectRanges( ranges );
1225
+ }
1226
+ })();
1227
+
1228
+ CKEDITOR.styleCommand = function( style )
1229
+ {
1230
+ this.style = style;
1231
+ };
1232
+
1233
+ CKEDITOR.styleCommand.prototype.exec = function( editor )
1234
+ {
1235
+ editor.focus();
1236
+
1237
+ var doc = editor.document;
1238
+
1239
+ if ( doc )
1240
+ {
1241
+ if ( this.state == CKEDITOR.TRISTATE_OFF )
1242
+ this.style.apply( doc );
1243
+ else if ( this.state == CKEDITOR.TRISTATE_ON )
1244
+ this.style.remove( doc );
1245
+ }
1246
+
1247
+ return !!doc;
1248
+ };
1249
+
1250
+ CKEDITOR.stylesSet = new CKEDITOR.resourceManager( '', 'stylesSet' );
1251
+
1252
+ // Backward compatibility (#5025).
1253
+ CKEDITOR.addStylesSet = CKEDITOR.tools.bind( CKEDITOR.stylesSet.add, CKEDITOR.stylesSet );
1254
+ CKEDITOR.loadStylesSet = function( name, url, callback )
1255
+ {
1256
+ CKEDITOR.stylesSet.addExternal( name, url, '' );
1257
+ CKEDITOR.stylesSet.load( name, callback );
1258
+ };