ckeditor 3.2.4 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (916) hide show
  1. data/README.rdoc +16 -20
  2. data/Rakefile +9 -8
  3. data/app/controllers/ckeditor_controller.rb +13 -13
  4. data/app/helpers/ckeditor_helper.rb +19 -2
  5. data/app/views/ckeditor/files.html.erb +1 -1
  6. data/app/views/ckeditor/images.html.erb +1 -1
  7. data/config/routes.rb +4 -4
  8. data/examples/s3/s3.yml +2 -0
  9. data/generators/ckeditor_install/USAGE +7 -0
  10. data/generators/ckeditor_install/ckeditor_install_generator.rb +28 -0
  11. data/generators/ckeditor_install/templates/README +0 -0
  12. data/generators/ckeditor_install/templates/ckeditor.rb +56 -0
  13. data/generators/ckeditor_install/templates/ckeditor/CHANGES.html +831 -0
  14. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/INSTALL.html +0 -0
  15. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/LICENSE.html +0 -0
  16. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/ajax.html +0 -0
  17. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/api.html +0 -0
  18. data/generators/ckeditor_install/templates/ckeditor/_samples/api_dialog.html +188 -0
  19. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/api_dialog/my_dialog.js +0 -0
  20. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/advanced.asp +105 -0
  21. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/events.asp +136 -0
  22. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/index.html +103 -0
  23. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/replace.asp +72 -0
  24. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/replaceall.asp +77 -0
  25. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/sample_posteddata.asp +46 -0
  26. data/generators/ckeditor_install/templates/ckeditor/_samples/asp/standalone.asp +72 -0
  27. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/assets/output_xhtml.css +0 -0
  28. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/divreplace.html +0 -0
  29. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/enterkey.html +0 -0
  30. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/fullpage.html +0 -0
  31. data/generators/ckeditor_install/templates/ckeditor/_samples/index.html +55 -0
  32. data/generators/ckeditor_install/templates/ckeditor/_samples/jqueryadapter.html +73 -0
  33. data/generators/ckeditor_install/templates/ckeditor/_samples/output_html.html +259 -0
  34. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/output_xhtml.html +0 -0
  35. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/php/advanced.php +0 -0
  36. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/php/events.php +0 -0
  37. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/php/replace.php +0 -0
  38. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/php/replaceall.php +0 -0
  39. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/php/standalone.php +0 -0
  40. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/replacebyclass.html +0 -0
  41. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/replacebycode.html +0 -0
  42. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/sample.css +0 -0
  43. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/sample.js +0 -0
  44. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/sample_posteddata.php +0 -0
  45. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/sharedspaces.html +0 -0
  46. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/skins.html +0 -0
  47. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/ui_color.html +0 -0
  48. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_samples/ui_languages.html +0 -0
  49. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/adapters/jquery.js +0 -0
  50. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/_bootstrap.js +0 -0
  51. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/ajax.js +0 -0
  52. data/generators/ckeditor_install/templates/ckeditor/_source/core/ckeditor.js +113 -0
  53. data/generators/ckeditor_install/templates/ckeditor/_source/core/ckeditor_base.js +193 -0
  54. data/generators/ckeditor_install/templates/ckeditor/_source/core/ckeditor_basic.js +242 -0
  55. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/command.js +0 -0
  56. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/commanddefinition.js +0 -0
  57. data/generators/ckeditor_install/templates/ckeditor/_source/core/config.js +333 -0
  58. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dataprocessor.js +0 -0
  59. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom.js +0 -0
  60. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/comment.js +0 -0
  61. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/document.js +0 -0
  62. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/documentfragment.js +0 -0
  63. data/generators/ckeditor_install/templates/ckeditor/_source/core/dom/domobject.js +251 -0
  64. data/generators/ckeditor_install/templates/ckeditor/_source/core/dom/element.js +1526 -0
  65. data/generators/ckeditor_install/templates/ckeditor/_source/core/dom/elementpath.js +116 -0
  66. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/event.js +0 -0
  67. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/node.js +0 -0
  68. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/nodelist.js +0 -0
  69. data/generators/ckeditor_install/templates/ckeditor/_source/core/dom/range.js +1865 -0
  70. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/text.js +0 -0
  71. data/generators/ckeditor_install/templates/ckeditor/_source/core/dom/walker.js +445 -0
  72. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dom/window.js +0 -0
  73. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/dtd.js +0 -0
  74. data/generators/ckeditor_install/templates/ckeditor/_source/core/editor.js +759 -0
  75. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/editor_basic.js +0 -0
  76. data/generators/ckeditor_install/templates/ckeditor/_source/core/env.js +227 -0
  77. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/event.js +0 -0
  78. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/eventInfo.js +0 -0
  79. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/focusmanager.js +0 -0
  80. data/generators/ckeditor_install/templates/ckeditor/_source/core/htmlparser.js +218 -0
  81. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/htmlparser/basicwriter.js +0 -0
  82. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/htmlparser/cdata.js +0 -0
  83. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/htmlparser/comment.js +0 -0
  84. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/htmlparser/element.js +0 -0
  85. data/generators/ckeditor_install/templates/ckeditor/_source/core/htmlparser/filter.js +288 -0
  86. data/generators/ckeditor_install/templates/ckeditor/_source/core/htmlparser/fragment.js +497 -0
  87. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/htmlparser/text.js +0 -0
  88. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/imagecacher.js +0 -0
  89. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/lang.js +0 -0
  90. data/generators/ckeditor_install/templates/ckeditor/_source/core/loader.js +242 -0
  91. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/plugindefinition.js +0 -0
  92. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/plugins.js +0 -0
  93. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/resourcemanager.js +0 -0
  94. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/scriptloader.js +0 -0
  95. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/skins.js +0 -0
  96. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/themes.js +0 -0
  97. data/generators/ckeditor_install/templates/ckeditor/_source/core/tools.js +733 -0
  98. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/ui.js +0 -0
  99. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/core/xml.js +0 -0
  100. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/lang/_languages.js +0 -0
  101. data/generators/ckeditor_install/templates/ckeditor/_source/lang/_translationstatus.txt +60 -0
  102. data/generators/ckeditor_install/templates/ckeditor/_source/lang/af.js +748 -0
  103. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ar.js +748 -0
  104. data/generators/ckeditor_install/templates/ckeditor/_source/lang/bg.js +748 -0
  105. data/generators/ckeditor_install/templates/ckeditor/_source/lang/bn.js +748 -0
  106. data/generators/ckeditor_install/templates/ckeditor/_source/lang/bs.js +748 -0
  107. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ca.js +748 -0
  108. data/generators/ckeditor_install/templates/ckeditor/_source/lang/cs.js +748 -0
  109. data/generators/ckeditor_install/templates/ckeditor/_source/lang/cy.js +748 -0
  110. data/generators/ckeditor_install/templates/ckeditor/_source/lang/da.js +748 -0
  111. data/generators/ckeditor_install/templates/ckeditor/_source/lang/de.js +748 -0
  112. data/generators/ckeditor_install/templates/ckeditor/_source/lang/el.js +748 -0
  113. data/generators/ckeditor_install/templates/ckeditor/_source/lang/en-au.js +748 -0
  114. data/generators/ckeditor_install/templates/ckeditor/_source/lang/en-ca.js +748 -0
  115. data/generators/ckeditor_install/templates/ckeditor/_source/lang/en-gb.js +748 -0
  116. data/generators/ckeditor_install/templates/ckeditor/_source/lang/en.js +748 -0
  117. data/generators/ckeditor_install/templates/ckeditor/_source/lang/eo.js +748 -0
  118. data/generators/ckeditor_install/templates/ckeditor/_source/lang/es.js +748 -0
  119. data/generators/ckeditor_install/templates/ckeditor/_source/lang/et.js +748 -0
  120. data/generators/ckeditor_install/templates/ckeditor/_source/lang/eu.js +748 -0
  121. data/generators/ckeditor_install/templates/ckeditor/_source/lang/fa.js +748 -0
  122. data/generators/ckeditor_install/templates/ckeditor/_source/lang/fi.js +748 -0
  123. data/generators/ckeditor_install/templates/ckeditor/_source/lang/fo.js +748 -0
  124. data/generators/ckeditor_install/templates/ckeditor/_source/lang/fr-ca.js +748 -0
  125. data/generators/ckeditor_install/templates/ckeditor/_source/lang/fr.js +748 -0
  126. data/generators/ckeditor_install/templates/ckeditor/_source/lang/gl.js +748 -0
  127. data/generators/ckeditor_install/templates/ckeditor/_source/lang/gu.js +748 -0
  128. data/generators/ckeditor_install/templates/ckeditor/_source/lang/he.js +748 -0
  129. data/generators/ckeditor_install/templates/ckeditor/_source/lang/hi.js +748 -0
  130. data/generators/ckeditor_install/templates/ckeditor/_source/lang/hr.js +748 -0
  131. data/generators/ckeditor_install/templates/ckeditor/_source/lang/hu.js +748 -0
  132. data/generators/ckeditor_install/templates/ckeditor/_source/lang/is.js +748 -0
  133. data/generators/ckeditor_install/templates/ckeditor/_source/lang/it.js +748 -0
  134. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ja.js +748 -0
  135. data/generators/ckeditor_install/templates/ckeditor/_source/lang/km.js +748 -0
  136. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ko.js +748 -0
  137. data/generators/ckeditor_install/templates/ckeditor/_source/lang/lt.js +748 -0
  138. data/generators/ckeditor_install/templates/ckeditor/_source/lang/lv.js +748 -0
  139. data/generators/ckeditor_install/templates/ckeditor/_source/lang/mn.js +748 -0
  140. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ms.js +748 -0
  141. data/generators/ckeditor_install/templates/ckeditor/_source/lang/nb.js +748 -0
  142. data/generators/ckeditor_install/templates/ckeditor/_source/lang/nl.js +748 -0
  143. data/generators/ckeditor_install/templates/ckeditor/_source/lang/no.js +748 -0
  144. data/generators/ckeditor_install/templates/ckeditor/_source/lang/pl.js +748 -0
  145. data/generators/ckeditor_install/templates/ckeditor/_source/lang/pt-br.js +747 -0
  146. data/generators/ckeditor_install/templates/ckeditor/_source/lang/pt.js +748 -0
  147. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ro.js +748 -0
  148. data/generators/ckeditor_install/templates/ckeditor/_source/lang/ru.js +748 -0
  149. data/generators/ckeditor_install/templates/ckeditor/_source/lang/sk.js +748 -0
  150. data/generators/ckeditor_install/templates/ckeditor/_source/lang/sl.js +748 -0
  151. data/generators/ckeditor_install/templates/ckeditor/_source/lang/sr-latn.js +748 -0
  152. data/generators/ckeditor_install/templates/ckeditor/_source/lang/sr.js +748 -0
  153. data/generators/ckeditor_install/templates/ckeditor/_source/lang/sv.js +748 -0
  154. data/generators/ckeditor_install/templates/ckeditor/_source/lang/th.js +748 -0
  155. data/generators/ckeditor_install/templates/ckeditor/_source/lang/tr.js +747 -0
  156. data/generators/ckeditor_install/templates/ckeditor/_source/lang/uk.js +748 -0
  157. data/generators/ckeditor_install/templates/ckeditor/_source/lang/vi.js +748 -0
  158. data/generators/ckeditor_install/templates/ckeditor/_source/lang/zh-cn.js +748 -0
  159. data/generators/ckeditor_install/templates/ckeditor/_source/lang/zh.js +748 -0
  160. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +0 -0
  161. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/a11yhelp/lang/en.js +0 -0
  162. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
  163. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/a11yhelp/plugin.js +46 -0
  164. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/about/dialogs/about.js +0 -0
  165. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  166. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/about/plugin.js +0 -0
  167. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/basicstyles/plugin.js +101 -0
  168. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/blockquote/plugin.js +0 -0
  169. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/button/plugin.js +277 -0
  170. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/clipboard/dialogs/paste.js +205 -0
  171. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/clipboard/plugin.js +413 -0
  172. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/colorbutton/plugin.js +251 -0
  173. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +339 -0
  174. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/colordialog/plugin.js +0 -0
  175. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/contextmenu/plugin.js +276 -0
  176. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/dialog/dialogDefinition.js +0 -0
  177. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/dialog/plugin.js +2968 -0
  178. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/dialogui/plugin.js +1520 -0
  179. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/div/dialogs/div.js +527 -0
  180. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/div/plugin.js +0 -0
  181. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/domiterator/plugin.js +341 -0
  182. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/editingblock/plugin.js +230 -0
  183. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/elementspath/plugin.js +206 -0
  184. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/enterkey/plugin.js +353 -0
  185. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/entities/plugin.js +0 -0
  186. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/fakeobjects/plugin.js +122 -0
  187. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/filebrowser/plugin.js +0 -0
  188. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/find/dialogs/find.js +867 -0
  189. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/find/plugin.js +0 -0
  190. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/flash/dialogs/flash.js +698 -0
  191. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  192. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/flash/plugin.js +173 -0
  193. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/floatpanel/plugin.js +376 -0
  194. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/font/plugin.js +0 -0
  195. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/format/plugin.js +194 -0
  196. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/forms/dialogs/button.js +0 -0
  197. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/forms/dialogs/checkbox.js +0 -0
  198. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/forms/dialogs/form.js +177 -0
  199. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +98 -0
  200. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/forms/dialogs/radio.js +0 -0
  201. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/forms/dialogs/select.js +0 -0
  202. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/forms/dialogs/textarea.js +0 -0
  203. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/forms/dialogs/textfield.js +199 -0
  204. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
  205. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/forms/plugin.js +281 -0
  206. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/horizontalrule/plugin.js +0 -0
  207. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/htmldataprocessor/plugin.js +486 -0
  208. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/htmlwriter/plugin.js +0 -0
  209. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/iframedialog/plugin.js +0 -0
  210. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/image/dialogs/image.js +1394 -0
  211. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/image/plugin.js +81 -0
  212. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/indent/plugin.js +422 -0
  213. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/justify/plugin.js +0 -0
  214. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/keystrokes/plugin.js +0 -0
  215. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/link/dialogs/anchor.js +0 -0
  216. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/link/dialogs/link.js +1419 -0
  217. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  218. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/link/plugin.js +229 -0
  219. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/list/plugin.js +651 -0
  220. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/listblock/plugin.js +0 -0
  221. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +203 -0
  222. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/liststyle/plugin.js +63 -0
  223. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/maximize/plugin.js +343 -0
  224. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/menu/plugin.js +0 -0
  225. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/menubutton/plugin.js +0 -0
  226. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/newpage/plugin.js +0 -0
  227. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  228. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/pagebreak/plugin.js +112 -0
  229. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/panel/plugin.js +398 -0
  230. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/panelbutton/plugin.js +0 -0
  231. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/pastefromword/filter/default.js +1170 -0
  232. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/pastefromword/plugin.js +122 -0
  233. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +70 -0
  234. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/pastetext/plugin.js +145 -0
  235. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/popup/plugin.js +0 -0
  236. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/preview/plugin.js +0 -0
  237. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/print/plugin.js +0 -0
  238. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/removeformat/plugin.js +182 -0
  239. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/resize/plugin.js +157 -0
  240. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/richcombo/plugin.js +0 -0
  241. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/save/plugin.js +0 -0
  242. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/scayt/dialogs/options.js +533 -0
  243. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +0 -0
  244. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/scayt/plugin.js +956 -0
  245. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/selection/plugin.js +1250 -0
  246. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  247. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  248. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  249. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  250. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  251. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  252. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  253. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  254. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  255. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  256. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  257. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/showblocks/plugin.js +0 -0
  258. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/showborders/plugin.js +175 -0
  259. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/smiley/dialogs/smiley.js +216 -0
  260. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  261. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  262. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  263. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  264. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  265. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  266. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  267. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  268. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  269. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  270. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  271. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  272. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  273. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  274. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  275. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  276. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  277. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  278. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  279. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  280. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  281. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/smiley/plugin.js +94 -0
  282. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/sourcearea/plugin.js +207 -0
  283. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +406 -0
  284. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/specialchar/plugin.js +0 -0
  285. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/styles/plugin.js +1394 -0
  286. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/styles/styles/default.js +0 -0
  287. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/stylescombo/plugin.js +205 -0
  288. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/tab/plugin.js +261 -0
  289. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/table/dialogs/table.js +598 -0
  290. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/table/plugin.js +78 -0
  291. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +524 -0
  292. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/tabletools/plugin.js +1116 -0
  293. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/templates/dialogs/templates.js +231 -0
  294. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/templates/plugin.js +0 -0
  295. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/templates/templates/default.js +0 -0
  296. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  297. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  298. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  299. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/toolbar/plugin.js +0 -0
  300. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +205 -0
  301. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/lang/en.js +0 -0
  302. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/plugin.js +0 -0
  303. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  304. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  305. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  306. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  307. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  308. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +15 -0
  309. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/uicolor/yui/yui.js +0 -0
  310. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/undo/plugin.js +555 -0
  311. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +0 -0
  312. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +0 -0
  313. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/wsc/dialogs/wsc.css +82 -0
  314. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/wsc/dialogs/wsc.js +0 -0
  315. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/plugins/wsc/plugin.js +0 -0
  316. data/generators/ckeditor_install/templates/ckeditor/_source/plugins/wysiwygarea/plugin.js +1026 -0
  317. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/dialog.css +856 -0
  318. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/editor.css +0 -0
  319. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/elementspath.css +73 -0
  320. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/icons.css +0 -0
  321. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/icons.png +0 -0
  322. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  323. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  324. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  325. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  326. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  327. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  328. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  329. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  330. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/mainui.css +195 -0
  331. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/menu.css +0 -0
  332. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/panel.css +216 -0
  333. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/presets.css +0 -0
  334. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/reset.css +84 -0
  335. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/richcombo.css +271 -0
  336. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/kama/skin.js +0 -0
  337. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/templates.css +88 -0
  338. data/generators/ckeditor_install/templates/ckeditor/_source/skins/kama/toolbar.css +404 -0
  339. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/dialog.css +765 -0
  340. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/editor.css +0 -0
  341. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/elementspath.css +74 -0
  342. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/icons.css +0 -0
  343. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/icons.png +0 -0
  344. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  345. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  346. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  347. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  348. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  349. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  350. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  351. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/mainui.css +145 -0
  352. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/menu.css +0 -0
  353. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/panel.css +211 -0
  354. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/presets.css +0 -0
  355. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/reset.css +84 -0
  356. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/richcombo.css +291 -0
  357. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/office2003/skin.js +0 -0
  358. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/templates.css +87 -0
  359. data/generators/ckeditor_install/templates/ckeditor/_source/skins/office2003/toolbar.css +465 -0
  360. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/dialog.css +780 -0
  361. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/editor.css +0 -0
  362. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/elementspath.css +74 -0
  363. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/icons.css +0 -0
  364. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/icons.png +0 -0
  365. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  366. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  367. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  368. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  369. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  370. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  371. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  372. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  373. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/mainui.css +154 -0
  374. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/menu.css +0 -0
  375. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/panel.css +211 -0
  376. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/presets.css +0 -0
  377. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/reset.css +84 -0
  378. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/richcombo.css +291 -0
  379. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/_source/skins/v2/skin.js +0 -0
  380. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/templates.css +87 -0
  381. data/generators/ckeditor_install/templates/ckeditor/_source/skins/v2/toolbar.css +418 -0
  382. data/generators/ckeditor_install/templates/ckeditor/_source/themes/default/theme.js +359 -0
  383. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/adapters/jquery.js +0 -0
  384. data/generators/ckeditor_install/templates/ckeditor/ckeditor.js +130 -0
  385. data/generators/ckeditor_install/templates/ckeditor/ckeditor.pack +208 -0
  386. data/generators/ckeditor_install/templates/ckeditor/ckeditor_basic.js +8 -0
  387. data/generators/ckeditor_install/templates/ckeditor/ckeditor_basic_source.js +20 -0
  388. data/generators/ckeditor_install/templates/ckeditor/ckeditor_source.js +25 -0
  389. data/generators/ckeditor_install/templates/ckeditor/config.js +42 -0
  390. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/contents.css +0 -0
  391. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/css/ckfinder.css +0 -0
  392. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/css/fck_dialog.css +0 -0
  393. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/css/fck_editor.css +0 -0
  394. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/css/swfupload.css +0 -0
  395. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/add.gif +0 -0
  396. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/cancelbutton.gif +0 -0
  397. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/ckfnothumb.gif +0 -0
  398. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/doc.gif +0 -0
  399. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/mp3.gif +0 -0
  400. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/pdf.gif +0 -0
  401. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/rar.gif +0 -0
  402. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/refresh.gif +0 -0
  403. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/select_files.png +0 -0
  404. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/spacer.gif +0 -0
  405. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/swf.gif +0 -0
  406. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/toolbar.start.gif +0 -0
  407. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/images/xls.gif +0 -0
  408. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/lang/_languages.js +0 -0
  409. data/generators/ckeditor_install/templates/ckeditor/lang/_translationstatus.txt +60 -0
  410. data/generators/ckeditor_install/templates/ckeditor/lang/af.js +6 -0
  411. data/generators/ckeditor_install/templates/ckeditor/lang/ar.js +6 -0
  412. data/generators/ckeditor_install/templates/ckeditor/lang/bg.js +6 -0
  413. data/generators/ckeditor_install/templates/ckeditor/lang/bn.js +6 -0
  414. data/generators/ckeditor_install/templates/ckeditor/lang/bs.js +6 -0
  415. data/generators/ckeditor_install/templates/ckeditor/lang/ca.js +6 -0
  416. data/generators/ckeditor_install/templates/ckeditor/lang/cs.js +6 -0
  417. data/generators/ckeditor_install/templates/ckeditor/lang/cy.js +6 -0
  418. data/generators/ckeditor_install/templates/ckeditor/lang/da.js +6 -0
  419. data/generators/ckeditor_install/templates/ckeditor/lang/de.js +6 -0
  420. data/generators/ckeditor_install/templates/ckeditor/lang/el.js +6 -0
  421. data/generators/ckeditor_install/templates/ckeditor/lang/en-au.js +6 -0
  422. data/generators/ckeditor_install/templates/ckeditor/lang/en-ca.js +6 -0
  423. data/generators/ckeditor_install/templates/ckeditor/lang/en-gb.js +6 -0
  424. data/generators/ckeditor_install/templates/ckeditor/lang/en.js +6 -0
  425. data/generators/ckeditor_install/templates/ckeditor/lang/eo.js +6 -0
  426. data/generators/ckeditor_install/templates/ckeditor/lang/es.js +6 -0
  427. data/generators/ckeditor_install/templates/ckeditor/lang/et.js +6 -0
  428. data/generators/ckeditor_install/templates/ckeditor/lang/eu.js +6 -0
  429. data/generators/ckeditor_install/templates/ckeditor/lang/fa.js +6 -0
  430. data/generators/ckeditor_install/templates/ckeditor/lang/fi.js +6 -0
  431. data/generators/ckeditor_install/templates/ckeditor/lang/fo.js +6 -0
  432. data/generators/ckeditor_install/templates/ckeditor/lang/fr-ca.js +6 -0
  433. data/generators/ckeditor_install/templates/ckeditor/lang/fr.js +6 -0
  434. data/generators/ckeditor_install/templates/ckeditor/lang/gl.js +6 -0
  435. data/generators/ckeditor_install/templates/ckeditor/lang/gu.js +6 -0
  436. data/generators/ckeditor_install/templates/ckeditor/lang/he.js +6 -0
  437. data/generators/ckeditor_install/templates/ckeditor/lang/hi.js +6 -0
  438. data/generators/ckeditor_install/templates/ckeditor/lang/hr.js +6 -0
  439. data/generators/ckeditor_install/templates/ckeditor/lang/hu.js +6 -0
  440. data/generators/ckeditor_install/templates/ckeditor/lang/is.js +6 -0
  441. data/generators/ckeditor_install/templates/ckeditor/lang/it.js +6 -0
  442. data/generators/ckeditor_install/templates/ckeditor/lang/ja.js +6 -0
  443. data/generators/ckeditor_install/templates/ckeditor/lang/km.js +6 -0
  444. data/generators/ckeditor_install/templates/ckeditor/lang/ko.js +6 -0
  445. data/generators/ckeditor_install/templates/ckeditor/lang/lt.js +6 -0
  446. data/generators/ckeditor_install/templates/ckeditor/lang/lv.js +6 -0
  447. data/generators/ckeditor_install/templates/ckeditor/lang/mn.js +6 -0
  448. data/generators/ckeditor_install/templates/ckeditor/lang/ms.js +6 -0
  449. data/generators/ckeditor_install/templates/ckeditor/lang/nb.js +6 -0
  450. data/generators/ckeditor_install/templates/ckeditor/lang/nl.js +6 -0
  451. data/generators/ckeditor_install/templates/ckeditor/lang/no.js +6 -0
  452. data/generators/ckeditor_install/templates/ckeditor/lang/pl.js +6 -0
  453. data/generators/ckeditor_install/templates/ckeditor/lang/pt-br.js +6 -0
  454. data/generators/ckeditor_install/templates/ckeditor/lang/pt.js +6 -0
  455. data/generators/ckeditor_install/templates/ckeditor/lang/ro.js +6 -0
  456. data/generators/ckeditor_install/templates/ckeditor/lang/ru.js +6 -0
  457. data/generators/ckeditor_install/templates/ckeditor/lang/sk.js +6 -0
  458. data/generators/ckeditor_install/templates/ckeditor/lang/sl.js +6 -0
  459. data/generators/ckeditor_install/templates/ckeditor/lang/sr-latn.js +6 -0
  460. data/generators/ckeditor_install/templates/ckeditor/lang/sr.js +6 -0
  461. data/generators/ckeditor_install/templates/ckeditor/lang/sv.js +6 -0
  462. data/generators/ckeditor_install/templates/ckeditor/lang/th.js +6 -0
  463. data/generators/ckeditor_install/templates/ckeditor/lang/tr.js +6 -0
  464. data/generators/ckeditor_install/templates/ckeditor/lang/uk.js +6 -0
  465. data/generators/ckeditor_install/templates/ckeditor/lang/vi.js +6 -0
  466. data/generators/ckeditor_install/templates/ckeditor/lang/zh-cn.js +6 -0
  467. data/generators/ckeditor_install/templates/ckeditor/lang/zh.js +6 -0
  468. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -0
  469. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/a11yhelp/lang/en.js +0 -0
  470. data/generators/ckeditor_install/templates/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
  471. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/about/dialogs/about.js +0 -0
  472. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  473. data/{lib/generators/templates/ckeditor/_source/plugins/embed → generators/ckeditor_install/templates/ckeditor/plugins/ajax_save}/plugin.js +0 -0
  474. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/attachment/dialogs/attachment.js +0 -0
  475. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/attachment/images/attachment.png +0 -0
  476. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/attachment/lang/en.js +0 -0
  477. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/attachment/lang/ru.js +0 -0
  478. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/attachment/lang/uk.js +0 -0
  479. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/attachment/plugin.js +0 -0
  480. data/generators/ckeditor_install/templates/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
  481. data/generators/ckeditor_install/templates/ckeditor/plugins/colordialog/dialogs/colordialog.js +7 -0
  482. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/dialog/dialogDefinition.js +0 -0
  483. data/generators/ckeditor_install/templates/ckeditor/plugins/div/dialogs/div.js +7 -0
  484. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/embed/dialogs/embed.js +0 -0
  485. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/embed/images/embed.png +0 -0
  486. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/embed/lang/en.js +0 -0
  487. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/embed/lang/ru.js +0 -0
  488. data/{lib/generators/templates/ckeditor/_source → generators/ckeditor_install/templates/ckeditor}/plugins/embed/lang/uk.js +0 -0
  489. data/generators/ckeditor_install/templates/ckeditor/plugins/embed/plugin.js +43 -0
  490. data/generators/ckeditor_install/templates/ckeditor/plugins/find/dialogs/find.js +9 -0
  491. data/generators/ckeditor_install/templates/ckeditor/plugins/flash/dialogs/flash.js +9 -0
  492. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/flash/images/placeholder.png +0 -0
  493. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/forms/dialogs/button.js +0 -0
  494. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/forms/dialogs/checkbox.js +0 -0
  495. data/generators/ckeditor_install/templates/ckeditor/plugins/forms/dialogs/form.js +6 -0
  496. data/generators/ckeditor_install/templates/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
  497. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/forms/dialogs/radio.js +0 -0
  498. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/forms/dialogs/select.js +0 -0
  499. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/forms/dialogs/textarea.js +0 -0
  500. data/generators/ckeditor_install/templates/ckeditor/plugins/forms/dialogs/textfield.js +7 -0
  501. data/generators/ckeditor_install/templates/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  502. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/iframedialog/plugin.js +0 -0
  503. data/generators/ckeditor_install/templates/ckeditor/plugins/image/dialogs/image.js +13 -0
  504. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/link/dialogs/anchor.js +0 -0
  505. data/generators/ckeditor_install/templates/ckeditor/plugins/link/dialogs/link.js +11 -0
  506. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/link/images/anchor.gif +0 -0
  507. data/generators/ckeditor_install/templates/ckeditor/plugins/liststyle/dialogs/liststyle.js +7 -0
  508. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  509. data/generators/ckeditor_install/templates/ckeditor/plugins/pastefromword/filter/default.js +10 -0
  510. data/generators/ckeditor_install/templates/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
  511. data/generators/ckeditor_install/templates/ckeditor/plugins/scayt/dialogs/options.js +8 -0
  512. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
  513. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  514. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  515. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  516. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  517. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  518. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  519. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  520. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  521. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  522. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  523. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  524. data/generators/ckeditor_install/templates/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
  525. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  526. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  527. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  528. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  529. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  530. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  531. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  532. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  533. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/heart.gif +0 -0
  534. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  535. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  536. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  537. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  538. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  539. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  540. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  541. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  542. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  543. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  544. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  545. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  546. data/generators/ckeditor_install/templates/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
  547. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/styles/styles/default.js +0 -0
  548. data/generators/ckeditor_install/templates/ckeditor/plugins/table/dialogs/table.js +9 -0
  549. data/generators/ckeditor_install/templates/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
  550. data/generators/ckeditor_install/templates/ckeditor/plugins/templates/dialogs/templates.js +7 -0
  551. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/templates/templates/default.js +0 -0
  552. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  553. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  554. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  555. data/generators/ckeditor_install/templates/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
  556. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/lang/en.js +0 -0
  557. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/plugin.js +0 -0
  558. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  559. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  560. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  561. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  562. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  563. data/generators/ckeditor_install/templates/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
  564. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/uicolor/yui/yui.js +0 -0
  565. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
  566. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
  567. data/generators/ckeditor_install/templates/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
  568. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/plugins/wsc/dialogs/wsc.js +0 -0
  569. data/generators/ckeditor_install/templates/ckeditor/skins/kama/dialog.css +9 -0
  570. data/generators/ckeditor_install/templates/ckeditor/skins/kama/editor.css +12 -0
  571. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/icons.png +0 -0
  572. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  573. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  574. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  575. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/mini.gif +0 -0
  576. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/noimage.png +0 -0
  577. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/sprites.png +0 -0
  578. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  579. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  580. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/kama/skin.js +0 -0
  581. data/generators/ckeditor_install/templates/ckeditor/skins/kama/templates.css +6 -0
  582. data/generators/ckeditor_install/templates/ckeditor/skins/office2003/dialog.css +9 -0
  583. data/generators/ckeditor_install/templates/ckeditor/skins/office2003/editor.css +13 -0
  584. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/icons.png +0 -0
  585. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  586. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  587. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  588. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/mini.gif +0 -0
  589. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/noimage.png +0 -0
  590. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/sprites.png +0 -0
  591. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  592. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/office2003/skin.js +0 -0
  593. data/generators/ckeditor_install/templates/ckeditor/skins/office2003/templates.css +6 -0
  594. data/generators/ckeditor_install/templates/ckeditor/skins/v2/dialog.css +8 -0
  595. data/generators/ckeditor_install/templates/ckeditor/skins/v2/editor.css +12 -0
  596. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/icons.png +0 -0
  597. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  598. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  599. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  600. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/mini.gif +0 -0
  601. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/noimage.png +0 -0
  602. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/sprites.png +0 -0
  603. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  604. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  605. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/skins/v2/skin.js +0 -0
  606. data/generators/ckeditor_install/templates/ckeditor/skins/v2/templates.css +6 -0
  607. data/generators/ckeditor_install/templates/ckeditor/swfupload/fileprogress.js +275 -0
  608. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/handlers.js +0 -0
  609. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/mootools-1.2.3-core-yc.js +0 -0
  610. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/querystring.js +0 -0
  611. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/swfupload.js +0 -0
  612. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/swfupload.queue.js +0 -0
  613. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/swfupload.swf +0 -0
  614. data/{lib/generators → generators/ckeditor_install}/templates/ckeditor/swfupload/swfupload.swfobject.js +0 -0
  615. data/generators/ckeditor_install/templates/ckeditor/themes/default/theme.js +8 -0
  616. data/generators/ckeditor_migration/USAGE +12 -0
  617. data/generators/ckeditor_migration/ckeditor_migration_generator.rb +36 -0
  618. data/{lib/generators → generators/ckeditor_migration}/templates/models/attachment_fu/asset.rb +0 -0
  619. data/{lib/generators → generators/ckeditor_migration}/templates/models/attachment_fu/attachment_file.rb +0 -0
  620. data/{lib/generators → generators/ckeditor_migration}/templates/models/attachment_fu/migration.rb +0 -0
  621. data/{lib/generators → generators/ckeditor_migration}/templates/models/attachment_fu/picture.rb +0 -0
  622. data/generators/ckeditor_migration/templates/models/paperclip/asset.rb +88 -0
  623. data/{lib/generators → generators/ckeditor_migration}/templates/models/paperclip/attachment_file.rb +0 -0
  624. data/{lib/generators → generators/ckeditor_migration}/templates/models/paperclip/migration.rb +0 -0
  625. data/{lib/generators → generators/ckeditor_migration}/templates/models/paperclip/picture.rb +0 -0
  626. data/lib/ckeditor.rb +22 -10
  627. data/lib/ckeditor/middleware.rb +1 -1
  628. data/lib/ckeditor/safe_buffer.rb +34 -0
  629. data/lib/ckeditor/utils.rb +6 -2
  630. data/lib/ckeditor/version.rb +2 -2
  631. data/lib/ckeditor/view_helper.rb +22 -27
  632. metadata +649 -631
  633. data/CHANGELOG +0 -15
  634. data/lib/ckeditor/engine.rb +0 -21
  635. data/lib/generators/USAGE +0 -17
  636. data/lib/generators/ckeditor_core_generator.rb +0 -18
  637. data/lib/generators/ckeditor_models_generator.rb +0 -41
  638. data/lib/generators/templates/ckeditor.rb +0 -52
  639. data/lib/generators/templates/ckeditor.yml +0 -28
  640. data/lib/generators/templates/ckeditor/CHANGES.html +0 -642
  641. data/lib/generators/templates/ckeditor/_samples/api_dialog.html +0 -181
  642. data/lib/generators/templates/ckeditor/_samples/index.html +0 -54
  643. data/lib/generators/templates/ckeditor/_samples/jqueryadapter.html +0 -73
  644. data/lib/generators/templates/ckeditor/_source/core/ckeditor.js +0 -103
  645. data/lib/generators/templates/ckeditor/_source/core/ckeditor_base.js +0 -193
  646. data/lib/generators/templates/ckeditor/_source/core/ckeditor_basic.js +0 -242
  647. data/lib/generators/templates/ckeditor/_source/core/config.js +0 -319
  648. data/lib/generators/templates/ckeditor/_source/core/dom/domobject.js +0 -246
  649. data/lib/generators/templates/ckeditor/_source/core/dom/element.js +0 -1441
  650. data/lib/generators/templates/ckeditor/_source/core/dom/elementpath.js +0 -104
  651. data/lib/generators/templates/ckeditor/_source/core/dom/range.js +0 -1836
  652. data/lib/generators/templates/ckeditor/_source/core/dom/walker.js +0 -451
  653. data/lib/generators/templates/ckeditor/_source/core/editor.js +0 -756
  654. data/lib/generators/templates/ckeditor/_source/core/env.js +0 -222
  655. data/lib/generators/templates/ckeditor/_source/core/htmlparser.js +0 -212
  656. data/lib/generators/templates/ckeditor/_source/core/htmlparser/filter.js +0 -262
  657. data/lib/generators/templates/ckeditor/_source/core/htmlparser/fragment.js +0 -496
  658. data/lib/generators/templates/ckeditor/_source/core/loader.js +0 -242
  659. data/lib/generators/templates/ckeditor/_source/core/tools.js +0 -698
  660. data/lib/generators/templates/ckeditor/_source/lang/_translationstatus.txt +0 -60
  661. data/lib/generators/templates/ckeditor/_source/lang/af.js +0 -708
  662. data/lib/generators/templates/ckeditor/_source/lang/ar.js +0 -708
  663. data/lib/generators/templates/ckeditor/_source/lang/bg.js +0 -708
  664. data/lib/generators/templates/ckeditor/_source/lang/bn.js +0 -708
  665. data/lib/generators/templates/ckeditor/_source/lang/bs.js +0 -708
  666. data/lib/generators/templates/ckeditor/_source/lang/ca.js +0 -708
  667. data/lib/generators/templates/ckeditor/_source/lang/cs.js +0 -708
  668. data/lib/generators/templates/ckeditor/_source/lang/cy.js +0 -708
  669. data/lib/generators/templates/ckeditor/_source/lang/da.js +0 -708
  670. data/lib/generators/templates/ckeditor/_source/lang/de.js +0 -708
  671. data/lib/generators/templates/ckeditor/_source/lang/el.js +0 -708
  672. data/lib/generators/templates/ckeditor/_source/lang/en-au.js +0 -708
  673. data/lib/generators/templates/ckeditor/_source/lang/en-ca.js +0 -708
  674. data/lib/generators/templates/ckeditor/_source/lang/en-gb.js +0 -708
  675. data/lib/generators/templates/ckeditor/_source/lang/en.js +0 -708
  676. data/lib/generators/templates/ckeditor/_source/lang/eo.js +0 -708
  677. data/lib/generators/templates/ckeditor/_source/lang/es.js +0 -708
  678. data/lib/generators/templates/ckeditor/_source/lang/et.js +0 -708
  679. data/lib/generators/templates/ckeditor/_source/lang/eu.js +0 -708
  680. data/lib/generators/templates/ckeditor/_source/lang/fa.js +0 -708
  681. data/lib/generators/templates/ckeditor/_source/lang/fi.js +0 -708
  682. data/lib/generators/templates/ckeditor/_source/lang/fo.js +0 -708
  683. data/lib/generators/templates/ckeditor/_source/lang/fr-ca.js +0 -708
  684. data/lib/generators/templates/ckeditor/_source/lang/fr.js +0 -708
  685. data/lib/generators/templates/ckeditor/_source/lang/gl.js +0 -708
  686. data/lib/generators/templates/ckeditor/_source/lang/gu.js +0 -708
  687. data/lib/generators/templates/ckeditor/_source/lang/he.js +0 -708
  688. data/lib/generators/templates/ckeditor/_source/lang/hi.js +0 -708
  689. data/lib/generators/templates/ckeditor/_source/lang/hr.js +0 -708
  690. data/lib/generators/templates/ckeditor/_source/lang/hu.js +0 -708
  691. data/lib/generators/templates/ckeditor/_source/lang/is.js +0 -708
  692. data/lib/generators/templates/ckeditor/_source/lang/it.js +0 -708
  693. data/lib/generators/templates/ckeditor/_source/lang/ja.js +0 -708
  694. data/lib/generators/templates/ckeditor/_source/lang/km.js +0 -708
  695. data/lib/generators/templates/ckeditor/_source/lang/ko.js +0 -708
  696. data/lib/generators/templates/ckeditor/_source/lang/lt.js +0 -708
  697. data/lib/generators/templates/ckeditor/_source/lang/lv.js +0 -708
  698. data/lib/generators/templates/ckeditor/_source/lang/mn.js +0 -708
  699. data/lib/generators/templates/ckeditor/_source/lang/ms.js +0 -708
  700. data/lib/generators/templates/ckeditor/_source/lang/nb.js +0 -708
  701. data/lib/generators/templates/ckeditor/_source/lang/nl.js +0 -708
  702. data/lib/generators/templates/ckeditor/_source/lang/no.js +0 -708
  703. data/lib/generators/templates/ckeditor/_source/lang/pl.js +0 -708
  704. data/lib/generators/templates/ckeditor/_source/lang/pt-br.js +0 -708
  705. data/lib/generators/templates/ckeditor/_source/lang/pt.js +0 -708
  706. data/lib/generators/templates/ckeditor/_source/lang/ro.js +0 -708
  707. data/lib/generators/templates/ckeditor/_source/lang/ru.js +0 -708
  708. data/lib/generators/templates/ckeditor/_source/lang/sk.js +0 -708
  709. data/lib/generators/templates/ckeditor/_source/lang/sl.js +0 -708
  710. data/lib/generators/templates/ckeditor/_source/lang/sr-latn.js +0 -708
  711. data/lib/generators/templates/ckeditor/_source/lang/sr.js +0 -708
  712. data/lib/generators/templates/ckeditor/_source/lang/sv.js +0 -708
  713. data/lib/generators/templates/ckeditor/_source/lang/th.js +0 -708
  714. data/lib/generators/templates/ckeditor/_source/lang/tr.js +0 -708
  715. data/lib/generators/templates/ckeditor/_source/lang/uk.js +0 -708
  716. data/lib/generators/templates/ckeditor/_source/lang/vi.js +0 -708
  717. data/lib/generators/templates/ckeditor/_source/lang/zh-cn.js +0 -708
  718. data/lib/generators/templates/ckeditor/_source/lang/zh.js +0 -708
  719. data/lib/generators/templates/ckeditor/_source/plugins/a11yhelp/plugin.js +0 -46
  720. data/lib/generators/templates/ckeditor/_source/plugins/basicstyles/plugin.js +0 -101
  721. data/lib/generators/templates/ckeditor/_source/plugins/button/plugin.js +0 -272
  722. data/lib/generators/templates/ckeditor/_source/plugins/clipboard/dialogs/paste.js +0 -186
  723. data/lib/generators/templates/ckeditor/_source/plugins/clipboard/plugin.js +0 -379
  724. data/lib/generators/templates/ckeditor/_source/plugins/colorbutton/plugin.js +0 -247
  725. data/lib/generators/templates/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +0 -191
  726. data/lib/generators/templates/ckeditor/_source/plugins/contextmenu/plugin.js +0 -274
  727. data/lib/generators/templates/ckeditor/_source/plugins/dialog/plugin.js +0 -2913
  728. data/lib/generators/templates/ckeditor/_source/plugins/dialogui/plugin.js +0 -1408
  729. data/lib/generators/templates/ckeditor/_source/plugins/div/dialogs/div.js +0 -529
  730. data/lib/generators/templates/ckeditor/_source/plugins/domiterator/plugin.js +0 -355
  731. data/lib/generators/templates/ckeditor/_source/plugins/editingblock/plugin.js +0 -224
  732. data/lib/generators/templates/ckeditor/_source/plugins/elementspath/plugin.js +0 -203
  733. data/lib/generators/templates/ckeditor/_source/plugins/enterkey/plugin.js +0 -339
  734. data/lib/generators/templates/ckeditor/_source/plugins/fakeobjects/plugin.js +0 -120
  735. data/lib/generators/templates/ckeditor/_source/plugins/find/dialogs/find.js +0 -867
  736. data/lib/generators/templates/ckeditor/_source/plugins/flash/dialogs/flash.js +0 -698
  737. data/lib/generators/templates/ckeditor/_source/plugins/flash/plugin.js +0 -165
  738. data/lib/generators/templates/ckeditor/_source/plugins/floatpanel/plugin.js +0 -376
  739. data/lib/generators/templates/ckeditor/_source/plugins/format/plugin.js +0 -193
  740. data/lib/generators/templates/ckeditor/_source/plugins/forms/dialogs/form.js +0 -177
  741. data/lib/generators/templates/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +0 -91
  742. data/lib/generators/templates/ckeditor/_source/plugins/forms/dialogs/textfield.js +0 -193
  743. data/lib/generators/templates/ckeditor/_source/plugins/forms/plugin.js +0 -217
  744. data/lib/generators/templates/ckeditor/_source/plugins/htmldataprocessor/plugin.js +0 -463
  745. data/lib/generators/templates/ckeditor/_source/plugins/image/dialogs/image.js +0 -1380
  746. data/lib/generators/templates/ckeditor/_source/plugins/image/plugin.js +0 -73
  747. data/lib/generators/templates/ckeditor/_source/plugins/indent/plugin.js +0 -381
  748. data/lib/generators/templates/ckeditor/_source/plugins/link/dialogs/link.js +0 -1413
  749. data/lib/generators/templates/ckeditor/_source/plugins/link/plugin.js +0 -219
  750. data/lib/generators/templates/ckeditor/_source/plugins/list/plugin.js +0 -645
  751. data/lib/generators/templates/ckeditor/_source/plugins/maximize/plugin.js +0 -305
  752. data/lib/generators/templates/ckeditor/_source/plugins/pagebreak/plugin.js +0 -103
  753. data/lib/generators/templates/ckeditor/_source/plugins/panel/plugin.js +0 -397
  754. data/lib/generators/templates/ckeditor/_source/plugins/pastefromword/filter/default.js +0 -1179
  755. data/lib/generators/templates/ckeditor/_source/plugins/pastefromword/plugin.js +0 -120
  756. data/lib/generators/templates/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +0 -77
  757. data/lib/generators/templates/ckeditor/_source/plugins/pastetext/plugin.js +0 -162
  758. data/lib/generators/templates/ckeditor/_source/plugins/removeformat/plugin.js +0 -132
  759. data/lib/generators/templates/ckeditor/_source/plugins/resize/plugin.js +0 -117
  760. data/lib/generators/templates/ckeditor/_source/plugins/scayt/dialogs/options.js +0 -533
  761. data/lib/generators/templates/ckeditor/_source/plugins/scayt/plugin.js +0 -767
  762. data/lib/generators/templates/ckeditor/_source/plugins/selection/plugin.js +0 -1145
  763. data/lib/generators/templates/ckeditor/_source/plugins/showborders/plugin.js +0 -167
  764. data/lib/generators/templates/ckeditor/_source/plugins/smiley/dialogs/smiley.js +0 -216
  765. data/lib/generators/templates/ckeditor/_source/plugins/smiley/plugin.js +0 -84
  766. data/lib/generators/templates/ckeditor/_source/plugins/sourcearea/plugin.js +0 -206
  767. data/lib/generators/templates/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +0 -403
  768. data/lib/generators/templates/ckeditor/_source/plugins/styles/plugin.js +0 -1442
  769. data/lib/generators/templates/ckeditor/_source/plugins/stylescombo/plugin.js +0 -204
  770. data/lib/generators/templates/ckeditor/_source/plugins/tab/plugin.js +0 -261
  771. data/lib/generators/templates/ckeditor/_source/plugins/table/dialogs/table.js +0 -591
  772. data/lib/generators/templates/ckeditor/_source/plugins/table/plugin.js +0 -70
  773. data/lib/generators/templates/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +0 -528
  774. data/lib/generators/templates/ckeditor/_source/plugins/tabletools/plugin.js +0 -1068
  775. data/lib/generators/templates/ckeditor/_source/plugins/templates/dialogs/templates.js +0 -230
  776. data/lib/generators/templates/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +0 -204
  777. data/lib/generators/templates/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +0 -15
  778. data/lib/generators/templates/ckeditor/_source/plugins/undo/plugin.js +0 -519
  779. data/lib/generators/templates/ckeditor/_source/plugins/wsc/dialogs/wsc.css +0 -83
  780. data/lib/generators/templates/ckeditor/_source/plugins/wysiwygarea/plugin.js +0 -882
  781. data/lib/generators/templates/ckeditor/_source/skins/kama/dialog.css +0 -835
  782. data/lib/generators/templates/ckeditor/_source/skins/kama/elementspath.css +0 -72
  783. data/lib/generators/templates/ckeditor/_source/skins/kama/mainui.css +0 -183
  784. data/lib/generators/templates/ckeditor/_source/skins/kama/panel.css +0 -216
  785. data/lib/generators/templates/ckeditor/_source/skins/kama/reset.css +0 -78
  786. data/lib/generators/templates/ckeditor/_source/skins/kama/richcombo.css +0 -270
  787. data/lib/generators/templates/ckeditor/_source/skins/kama/templates.css +0 -84
  788. data/lib/generators/templates/ckeditor/_source/skins/kama/toolbar.css +0 -409
  789. data/lib/generators/templates/ckeditor/_source/skins/office2003/dialog.css +0 -738
  790. data/lib/generators/templates/ckeditor/_source/skins/office2003/elementspath.css +0 -73
  791. data/lib/generators/templates/ckeditor/_source/skins/office2003/mainui.css +0 -133
  792. data/lib/generators/templates/ckeditor/_source/skins/office2003/panel.css +0 -211
  793. data/lib/generators/templates/ckeditor/_source/skins/office2003/reset.css +0 -78
  794. data/lib/generators/templates/ckeditor/_source/skins/office2003/richcombo.css +0 -289
  795. data/lib/generators/templates/ckeditor/_source/skins/office2003/templates.css +0 -81
  796. data/lib/generators/templates/ckeditor/_source/skins/office2003/toolbar.css +0 -463
  797. data/lib/generators/templates/ckeditor/_source/skins/v2/dialog.css +0 -753
  798. data/lib/generators/templates/ckeditor/_source/skins/v2/elementspath.css +0 -73
  799. data/lib/generators/templates/ckeditor/_source/skins/v2/mainui.css +0 -142
  800. data/lib/generators/templates/ckeditor/_source/skins/v2/panel.css +0 -211
  801. data/lib/generators/templates/ckeditor/_source/skins/v2/reset.css +0 -78
  802. data/lib/generators/templates/ckeditor/_source/skins/v2/richcombo.css +0 -289
  803. data/lib/generators/templates/ckeditor/_source/skins/v2/templates.css +0 -81
  804. data/lib/generators/templates/ckeditor/_source/skins/v2/toolbar.css +0 -415
  805. data/lib/generators/templates/ckeditor/_source/themes/default/theme.js +0 -335
  806. data/lib/generators/templates/ckeditor/ckeditor.js +0 -124
  807. data/lib/generators/templates/ckeditor/ckeditor.pack +0 -205
  808. data/lib/generators/templates/ckeditor/ckeditor_basic.js +0 -8
  809. data/lib/generators/templates/ckeditor/ckeditor_basic_source.js +0 -20
  810. data/lib/generators/templates/ckeditor/ckeditor_source.js +0 -25
  811. data/lib/generators/templates/ckeditor/config.js +0 -42
  812. data/lib/generators/templates/ckeditor/lang/_translationstatus.txt +0 -60
  813. data/lib/generators/templates/ckeditor/lang/af.js +0 -6
  814. data/lib/generators/templates/ckeditor/lang/ar.js +0 -6
  815. data/lib/generators/templates/ckeditor/lang/bg.js +0 -6
  816. data/lib/generators/templates/ckeditor/lang/bn.js +0 -6
  817. data/lib/generators/templates/ckeditor/lang/bs.js +0 -6
  818. data/lib/generators/templates/ckeditor/lang/ca.js +0 -6
  819. data/lib/generators/templates/ckeditor/lang/cs.js +0 -6
  820. data/lib/generators/templates/ckeditor/lang/cy.js +0 -6
  821. data/lib/generators/templates/ckeditor/lang/da.js +0 -6
  822. data/lib/generators/templates/ckeditor/lang/de.js +0 -6
  823. data/lib/generators/templates/ckeditor/lang/el.js +0 -6
  824. data/lib/generators/templates/ckeditor/lang/en-au.js +0 -6
  825. data/lib/generators/templates/ckeditor/lang/en-ca.js +0 -6
  826. data/lib/generators/templates/ckeditor/lang/en-gb.js +0 -6
  827. data/lib/generators/templates/ckeditor/lang/en.js +0 -6
  828. data/lib/generators/templates/ckeditor/lang/eo.js +0 -6
  829. data/lib/generators/templates/ckeditor/lang/es.js +0 -6
  830. data/lib/generators/templates/ckeditor/lang/et.js +0 -6
  831. data/lib/generators/templates/ckeditor/lang/eu.js +0 -6
  832. data/lib/generators/templates/ckeditor/lang/fa.js +0 -6
  833. data/lib/generators/templates/ckeditor/lang/fi.js +0 -6
  834. data/lib/generators/templates/ckeditor/lang/fo.js +0 -6
  835. data/lib/generators/templates/ckeditor/lang/fr-ca.js +0 -6
  836. data/lib/generators/templates/ckeditor/lang/fr.js +0 -6
  837. data/lib/generators/templates/ckeditor/lang/gl.js +0 -6
  838. data/lib/generators/templates/ckeditor/lang/gu.js +0 -6
  839. data/lib/generators/templates/ckeditor/lang/he.js +0 -6
  840. data/lib/generators/templates/ckeditor/lang/hi.js +0 -6
  841. data/lib/generators/templates/ckeditor/lang/hr.js +0 -6
  842. data/lib/generators/templates/ckeditor/lang/hu.js +0 -6
  843. data/lib/generators/templates/ckeditor/lang/is.js +0 -6
  844. data/lib/generators/templates/ckeditor/lang/it.js +0 -6
  845. data/lib/generators/templates/ckeditor/lang/ja.js +0 -6
  846. data/lib/generators/templates/ckeditor/lang/km.js +0 -6
  847. data/lib/generators/templates/ckeditor/lang/ko.js +0 -6
  848. data/lib/generators/templates/ckeditor/lang/lt.js +0 -6
  849. data/lib/generators/templates/ckeditor/lang/lv.js +0 -6
  850. data/lib/generators/templates/ckeditor/lang/mn.js +0 -6
  851. data/lib/generators/templates/ckeditor/lang/ms.js +0 -6
  852. data/lib/generators/templates/ckeditor/lang/nb.js +0 -6
  853. data/lib/generators/templates/ckeditor/lang/nl.js +0 -6
  854. data/lib/generators/templates/ckeditor/lang/no.js +0 -6
  855. data/lib/generators/templates/ckeditor/lang/pl.js +0 -6
  856. data/lib/generators/templates/ckeditor/lang/pt-br.js +0 -6
  857. data/lib/generators/templates/ckeditor/lang/pt.js +0 -6
  858. data/lib/generators/templates/ckeditor/lang/ro.js +0 -6
  859. data/lib/generators/templates/ckeditor/lang/ru.js +0 -6
  860. data/lib/generators/templates/ckeditor/lang/sk.js +0 -6
  861. data/lib/generators/templates/ckeditor/lang/sl.js +0 -6
  862. data/lib/generators/templates/ckeditor/lang/sr-latn.js +0 -6
  863. data/lib/generators/templates/ckeditor/lang/sr.js +0 -6
  864. data/lib/generators/templates/ckeditor/lang/sv.js +0 -6
  865. data/lib/generators/templates/ckeditor/lang/th.js +0 -6
  866. data/lib/generators/templates/ckeditor/lang/tr.js +0 -6
  867. data/lib/generators/templates/ckeditor/lang/uk.js +0 -6
  868. data/lib/generators/templates/ckeditor/lang/vi.js +0 -6
  869. data/lib/generators/templates/ckeditor/lang/zh-cn.js +0 -6
  870. data/lib/generators/templates/ckeditor/lang/zh.js +0 -6
  871. data/lib/generators/templates/ckeditor/plugins/attachment/dialogs/attachment.js +0 -1
  872. data/lib/generators/templates/ckeditor/plugins/attachment/images/attachment.png +0 -0
  873. data/lib/generators/templates/ckeditor/plugins/attachment/lang/en.js +0 -1
  874. data/lib/generators/templates/ckeditor/plugins/attachment/lang/ru.js +0 -1
  875. data/lib/generators/templates/ckeditor/plugins/attachment/lang/uk.js +0 -1
  876. data/lib/generators/templates/ckeditor/plugins/attachment/plugin.js +0 -1
  877. data/lib/generators/templates/ckeditor/plugins/clipboard/dialogs/paste.js +0 -7
  878. data/lib/generators/templates/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -6
  879. data/lib/generators/templates/ckeditor/plugins/div/dialogs/div.js +0 -7
  880. data/lib/generators/templates/ckeditor/plugins/embed/dialogs/embed.js +0 -1
  881. data/lib/generators/templates/ckeditor/plugins/embed/images/embed.png +0 -0
  882. data/lib/generators/templates/ckeditor/plugins/embed/lang/en.js +0 -1
  883. data/lib/generators/templates/ckeditor/plugins/embed/lang/ru.js +0 -1
  884. data/lib/generators/templates/ckeditor/plugins/embed/lang/uk.js +0 -1
  885. data/lib/generators/templates/ckeditor/plugins/embed/plugin.js +0 -1
  886. data/lib/generators/templates/ckeditor/plugins/find/dialogs/find.js +0 -9
  887. data/lib/generators/templates/ckeditor/plugins/flash/dialogs/flash.js +0 -9
  888. data/lib/generators/templates/ckeditor/plugins/forms/dialogs/form.js +0 -6
  889. data/lib/generators/templates/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -6
  890. data/lib/generators/templates/ckeditor/plugins/forms/dialogs/textfield.js +0 -6
  891. data/lib/generators/templates/ckeditor/plugins/image/dialogs/image.js +0 -13
  892. data/lib/generators/templates/ckeditor/plugins/link/dialogs/link.js +0 -11
  893. data/lib/generators/templates/ckeditor/plugins/pastefromword/filter/default.js +0 -10
  894. data/lib/generators/templates/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -6
  895. data/lib/generators/templates/ckeditor/plugins/scayt/dialogs/options.js +0 -8
  896. data/lib/generators/templates/ckeditor/plugins/smiley/dialogs/smiley.js +0 -7
  897. data/lib/generators/templates/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -7
  898. data/lib/generators/templates/ckeditor/plugins/table/dialogs/table.js +0 -9
  899. data/lib/generators/templates/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -8
  900. data/lib/generators/templates/ckeditor/plugins/templates/dialogs/templates.js +0 -7
  901. data/lib/generators/templates/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -7
  902. data/lib/generators/templates/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -6
  903. data/lib/generators/templates/ckeditor/plugins/wsc/dialogs/wsc.css +0 -6
  904. data/lib/generators/templates/ckeditor/skins/kama/dialog.css +0 -9
  905. data/lib/generators/templates/ckeditor/skins/kama/editor.css +0 -12
  906. data/lib/generators/templates/ckeditor/skins/kama/templates.css +0 -6
  907. data/lib/generators/templates/ckeditor/skins/office2003/dialog.css +0 -9
  908. data/lib/generators/templates/ckeditor/skins/office2003/editor.css +0 -13
  909. data/lib/generators/templates/ckeditor/skins/office2003/templates.css +0 -6
  910. data/lib/generators/templates/ckeditor/skins/v2/dialog.css +0 -8
  911. data/lib/generators/templates/ckeditor/skins/v2/editor.css +0 -12
  912. data/lib/generators/templates/ckeditor/skins/v2/templates.css +0 -6
  913. data/lib/generators/templates/ckeditor/swfupload/fileprogress.js +0 -272
  914. data/lib/generators/templates/ckeditor/themes/default/theme.js +0 -8
  915. data/lib/generators/templates/models/paperclip/asset.rb +0 -86
  916. data/lib/tasks/ckeditor_tasks.rake +0 -3
@@ -0,0 +1,1394 @@
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 occurrence 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,th:1,ul:1,dl:1,dt:1,dd:1,form: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
+ : this.type == CKEDITOR.STYLE_OBJECT ?
131
+ applyObjectStyle
132
+ : null ).call( this, range );
133
+ },
134
+
135
+ removeFromRange : function( range )
136
+ {
137
+ return ( this.removeFromRange =
138
+ this.type == CKEDITOR.STYLE_INLINE ?
139
+ removeInlineStyle
140
+ : null ).call( this, range );
141
+ },
142
+
143
+ applyToObject : function( element )
144
+ {
145
+ setupElement( element, this );
146
+ },
147
+
148
+ /**
149
+ * Get the style state inside an element path. Returns "true" if the
150
+ * element is active in the path.
151
+ */
152
+ checkActive : function( elementPath )
153
+ {
154
+ switch ( this.type )
155
+ {
156
+ case CKEDITOR.STYLE_BLOCK :
157
+ return this.checkElementRemovable( elementPath.block || elementPath.blockLimit, true );
158
+
159
+ case CKEDITOR.STYLE_OBJECT :
160
+ case CKEDITOR.STYLE_INLINE :
161
+
162
+ var elements = elementPath.elements;
163
+
164
+ for ( var i = 0, element ; i < elements.length ; i++ )
165
+ {
166
+ element = elements[ i ];
167
+
168
+ if ( this.type == CKEDITOR.STYLE_INLINE
169
+ && ( element == elementPath.block || element == elementPath.blockLimit ) )
170
+ continue;
171
+
172
+ if( this.type == CKEDITOR.STYLE_OBJECT
173
+ && !( element.getName() in objectElements ) )
174
+ continue;
175
+
176
+ if ( this.checkElementRemovable( element, true ) )
177
+ return true;
178
+ }
179
+ }
180
+ return false;
181
+ },
182
+
183
+ /**
184
+ * Whether this style can be applied at the element path.
185
+ * @param elementPath
186
+ */
187
+ checkApplicable : function( elementPath )
188
+ {
189
+ switch ( this.type )
190
+ {
191
+ case CKEDITOR.STYLE_INLINE :
192
+ case CKEDITOR.STYLE_BLOCK :
193
+ break;
194
+
195
+ case CKEDITOR.STYLE_OBJECT :
196
+ return elementPath.lastElement.getAscendant( this.element, true );
197
+ }
198
+
199
+ return true;
200
+ },
201
+
202
+ // Checks if an element, or any of its attributes, is removable by the
203
+ // current style definition.
204
+ checkElementRemovable : function( element, fullMatch )
205
+ {
206
+ if ( !element )
207
+ return false;
208
+
209
+ var def = this._.definition,
210
+ attribs;
211
+
212
+ // If the element name is the same as the style name.
213
+ if ( element.getName() == this.element )
214
+ {
215
+ // If no attributes are defined in the element.
216
+ if ( !fullMatch && !element.hasAttributes() )
217
+ return true;
218
+
219
+ attribs = getAttributesForComparison( def );
220
+
221
+ if ( attribs._length )
222
+ {
223
+ for ( var attName in attribs )
224
+ {
225
+ if ( attName == '_length' )
226
+ continue;
227
+
228
+ var elementAttr = element.getAttribute( attName ) || '';
229
+
230
+ // Special treatment for 'style' attribute is required.
231
+ if ( attName == 'style' ?
232
+ compareCssText( attribs[ attName ], normalizeCssText( elementAttr, false ) )
233
+ : attribs[ attName ] == elementAttr )
234
+ {
235
+ if ( !fullMatch )
236
+ return true;
237
+ }
238
+ else if ( fullMatch )
239
+ return false;
240
+ }
241
+ if ( fullMatch )
242
+ return true;
243
+ }
244
+ else
245
+ return true;
246
+ }
247
+
248
+ // Check if the element can be somehow overriden.
249
+ var override = getOverrides( this )[ element.getName() ] ;
250
+ if ( override )
251
+ {
252
+ // If no attributes have been defined, remove the element.
253
+ if ( !( attribs = override.attributes ) )
254
+ return true;
255
+
256
+ for ( var i = 0 ; i < attribs.length ; i++ )
257
+ {
258
+ attName = attribs[i][0];
259
+ var actualAttrValue = element.getAttribute( attName );
260
+ if ( actualAttrValue )
261
+ {
262
+ var attValue = attribs[i][1];
263
+
264
+ // Remove the attribute if:
265
+ // - The override definition value is null;
266
+ // - The override definition value is a string that
267
+ // matches the attribute value exactly.
268
+ // - The override definition value is a regex that
269
+ // has matches in the attribute value.
270
+ if ( attValue === null ||
271
+ ( typeof attValue == 'string' && actualAttrValue == attValue ) ||
272
+ attValue.test( actualAttrValue ) )
273
+ return true;
274
+ }
275
+ }
276
+ }
277
+ return false;
278
+ },
279
+
280
+ // Builds the preview HTML based on the styles definition.
281
+ buildPreview : function()
282
+ {
283
+ var styleDefinition = this._.definition,
284
+ html = [],
285
+ elementName = styleDefinition.element;
286
+
287
+ // Avoid <bdo> in the preview.
288
+ if ( elementName == 'bdo' )
289
+ elementName = 'span';
290
+
291
+ html = [ '<', elementName ];
292
+
293
+ // Assign all defined attributes.
294
+ var attribs = styleDefinition.attributes;
295
+ if ( attribs )
296
+ {
297
+ for ( var att in attribs )
298
+ {
299
+ html.push( ' ', att, '="', attribs[ att ], '"' );
300
+ }
301
+ }
302
+
303
+ // Assign the style attribute.
304
+ var cssStyle = CKEDITOR.style.getStyleText( styleDefinition );
305
+ if ( cssStyle )
306
+ html.push( ' style="', cssStyle, '"' );
307
+
308
+ html.push( '>', styleDefinition.name, '</', elementName, '>' );
309
+
310
+ return html.join( '' );
311
+ }
312
+ };
313
+
314
+ // Build the cssText based on the styles definition.
315
+ CKEDITOR.style.getStyleText = function( styleDefinition )
316
+ {
317
+ // If we have already computed it, just return it.
318
+ var stylesDef = styleDefinition._ST;
319
+ if ( stylesDef )
320
+ return stylesDef;
321
+
322
+ stylesDef = styleDefinition.styles;
323
+
324
+ // Builds the StyleText.
325
+ var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '',
326
+ specialStylesText = '';
327
+
328
+ if ( stylesText.length )
329
+ stylesText = stylesText.replace( semicolonFixRegex, ';' );
330
+
331
+ for ( var style in stylesDef )
332
+ {
333
+ var styleVal = stylesDef[ style ],
334
+ text = ( style + ':' + styleVal ).replace( semicolonFixRegex, ';' );
335
+
336
+ // Some browsers don't support 'inherit' property value, leave them intact. (#5242)
337
+ if ( styleVal == 'inherit' )
338
+ specialStylesText += text;
339
+ else
340
+ stylesText += text;
341
+ }
342
+
343
+ // Browsers make some changes to the style when applying them. So, here
344
+ // we normalize it to the browser format.
345
+ if ( stylesText.length )
346
+ stylesText = normalizeCssText( stylesText );
347
+
348
+ stylesText += specialStylesText;
349
+
350
+ // Return it, saving it to the next request.
351
+ return ( styleDefinition._ST = stylesText );
352
+ };
353
+
354
+ function applyInlineStyle( range )
355
+ {
356
+ var document = range.document;
357
+
358
+ if ( range.collapsed )
359
+ {
360
+ // Create the element to be inserted in the DOM.
361
+ var collapsedElement = getElement( this, document );
362
+
363
+ // Insert the empty element into the DOM at the range position.
364
+ range.insertNode( collapsedElement );
365
+
366
+ // Place the selection right inside the empty element.
367
+ range.moveToPosition( collapsedElement, CKEDITOR.POSITION_BEFORE_END );
368
+
369
+ return;
370
+ }
371
+
372
+ var elementName = this.element;
373
+ var def = this._.definition;
374
+ var isUnknownElement;
375
+
376
+ // Get the DTD definition for the element. Defaults to "span".
377
+ var dtd = CKEDITOR.dtd[ elementName ] || ( isUnknownElement = true, CKEDITOR.dtd.span );
378
+
379
+ // Bookmark the range so we can re-select it after processing.
380
+ var bookmark = range.createBookmark();
381
+
382
+ // Expand the range.
383
+ range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
384
+ range.trim();
385
+
386
+ // Get the first node to be processed and the last, which concludes the
387
+ // processing.
388
+ var boundaryNodes = range.createBookmark(),
389
+ firstNode = boundaryNodes.startNode,
390
+ lastNode = boundaryNodes.endNode;
391
+
392
+ var currentNode = firstNode;
393
+
394
+ var styleRange;
395
+
396
+ while ( currentNode )
397
+ {
398
+ var applyStyle = false;
399
+
400
+ if ( currentNode.equals( lastNode ) )
401
+ {
402
+ currentNode = null;
403
+ applyStyle = true;
404
+ }
405
+ else
406
+ {
407
+ var nodeType = currentNode.type;
408
+ var nodeName = nodeType == CKEDITOR.NODE_ELEMENT ? currentNode.getName() : null;
409
+
410
+ if ( nodeName && currentNode.getAttribute( '_fck_bookmark' ) )
411
+ {
412
+ currentNode = currentNode.getNextSourceNode( true );
413
+ continue;
414
+ }
415
+
416
+ // Check if the current node can be a child of the style element.
417
+ if ( !nodeName || ( dtd[ nodeName ]
418
+ && ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
419
+ && ( !def.childRule || def.childRule( currentNode ) ) ) )
420
+ {
421
+ var currentParent = currentNode.getParent();
422
+
423
+ // Check if the style element can be a child of the current
424
+ // node parent or if the element is not defined in the DTD.
425
+ if ( currentParent
426
+ && ( ( currentParent.getDtd() || CKEDITOR.dtd.span )[ elementName ] || isUnknownElement )
427
+ && ( !def.parentRule || def.parentRule( currentParent ) ) )
428
+ {
429
+ // This node will be part of our range, so if it has not
430
+ // been started, place its start right before the node.
431
+ // In the case of an element node, it will be included
432
+ // only if it is entirely inside the range.
433
+ 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 ) ) )
434
+ {
435
+ styleRange = new CKEDITOR.dom.range( document );
436
+ styleRange.setStartBefore( currentNode );
437
+ }
438
+
439
+ // Non element nodes, or empty elements can be added
440
+ // completely to the range.
441
+ if ( nodeType == CKEDITOR.NODE_TEXT || ( nodeType == CKEDITOR.NODE_ELEMENT && !currentNode.getChildCount() ) )
442
+ {
443
+ var includedNode = currentNode;
444
+ var parentNode;
445
+
446
+ // This node is about to be included completelly, but,
447
+ // if this is the last node in its parent, we must also
448
+ // check if the parent itself can be added completelly
449
+ // to the range.
450
+ while ( !includedNode.$.nextSibling
451
+ && ( parentNode = includedNode.getParent(), dtd[ parentNode.getName() ] )
452
+ && ( parentNode.getPosition( firstNode ) | CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_FOLLOWING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
453
+ && ( !def.childRule || def.childRule( parentNode ) ) )
454
+ {
455
+ includedNode = parentNode;
456
+ }
457
+
458
+ styleRange.setEndAfter( includedNode );
459
+
460
+ // If the included node still is the last node in its
461
+ // parent, it means that the parent can't be included
462
+ // in this style DTD, so apply the style immediately.
463
+ if ( !includedNode.$.nextSibling )
464
+ applyStyle = true;
465
+
466
+ }
467
+ }
468
+ else
469
+ applyStyle = true;
470
+ }
471
+ else
472
+ applyStyle = true;
473
+
474
+ // Get the next node to be processed.
475
+ currentNode = currentNode.getNextSourceNode();
476
+ }
477
+
478
+ // Apply the style if we have something to which apply it.
479
+ if ( applyStyle && styleRange && !styleRange.collapsed )
480
+ {
481
+ // Build the style element, based on the style object definition.
482
+ var styleNode = getElement( this, document );
483
+
484
+ // Get the element that holds the entire range.
485
+ var parent = styleRange.getCommonAncestor();
486
+
487
+ // Loop through the parents, removing the redundant attributes
488
+ // from the element to be applied.
489
+ while ( styleNode && parent )
490
+ {
491
+ if ( parent.getName() == elementName )
492
+ {
493
+ for ( var attName in def.attributes )
494
+ {
495
+ if ( styleNode.getAttribute( attName ) == parent.getAttribute( attName ) )
496
+ styleNode.removeAttribute( attName );
497
+ }
498
+
499
+ for ( var styleName in def.styles )
500
+ {
501
+ if ( styleNode.getStyle( styleName ) == parent.getStyle( styleName ) )
502
+ styleNode.removeStyle( styleName );
503
+ }
504
+
505
+ if ( !styleNode.hasAttributes() )
506
+ {
507
+ styleNode = null;
508
+ break;
509
+ }
510
+ }
511
+
512
+ parent = parent.getParent();
513
+ }
514
+
515
+ if ( styleNode )
516
+ {
517
+ // Move the contents of the range to the style element.
518
+ styleRange.extractContents().appendTo( styleNode );
519
+
520
+ // Here we do some cleanup, removing all duplicated
521
+ // elements from the style element.
522
+ removeFromInsideElement( this, styleNode );
523
+
524
+ // Insert it into the range position (it is collapsed after
525
+ // extractContents.
526
+ styleRange.insertNode( styleNode );
527
+
528
+ // Let's merge our new style with its neighbors, if possible.
529
+ styleNode.mergeSiblings();
530
+
531
+ // As the style system breaks text nodes constantly, let's normalize
532
+ // things for performance.
533
+ // With IE, some paragraphs get broken when calling normalize()
534
+ // repeatedly. Also, for IE, we must normalize body, not documentElement.
535
+ // IE is also known for having a "crash effect" with normalize().
536
+ // We should try to normalize with IE too in some way, somewhere.
537
+ if ( !CKEDITOR.env.ie )
538
+ styleNode.$.normalize();
539
+ }
540
+
541
+ // Style applied, let's release the range, so it gets
542
+ // re-initialization in the next loop.
543
+ styleRange = null;
544
+ }
545
+ }
546
+
547
+ firstNode.remove();
548
+ lastNode.remove();
549
+ range.moveToBookmark( bookmark );
550
+ // Minimize the result range to exclude empty text nodes. (#5374)
551
+ range.shrink( CKEDITOR.SHRINK_TEXT );
552
+ }
553
+
554
+ function removeInlineStyle( range )
555
+ {
556
+ /*
557
+ * Make sure our range has included all "collpased" parent inline nodes so
558
+ * that our operation logic can be simpler.
559
+ */
560
+ range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
561
+
562
+ var bookmark = range.createBookmark(),
563
+ startNode = bookmark.startNode;
564
+
565
+ if ( range.collapsed )
566
+ {
567
+
568
+ var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
569
+ // The topmost element in elementspatch which we should jump out of.
570
+ boundaryElement;
571
+
572
+
573
+ for ( var i = 0, element ; i < startPath.elements.length
574
+ && ( element = startPath.elements[i] ) ; i++ )
575
+ {
576
+ /*
577
+ * 1. If it's collaped inside text nodes, try to remove the style from the whole element.
578
+ *
579
+ * 2. Otherwise if it's collapsed on element boundaries, moving the selection
580
+ * outside the styles instead of removing the whole tag,
581
+ * also make sure other inner styles were well preserverd.(#3309)
582
+ */
583
+ if ( element == startPath.block || element == startPath.blockLimit )
584
+ break;
585
+
586
+ if ( this.checkElementRemovable( element ) )
587
+ {
588
+ var endOfElement = range.checkBoundaryOfElement( element, CKEDITOR.END ),
589
+ startOfElement = !endOfElement && range.checkBoundaryOfElement( element, CKEDITOR.START );
590
+ if ( startOfElement || endOfElement )
591
+ {
592
+ boundaryElement = element;
593
+ boundaryElement.match = startOfElement ? 'start' : 'end';
594
+ }
595
+ else
596
+ {
597
+ /*
598
+ * Before removing the style node, there may be a sibling to the style node
599
+ * that's exactly the same to the one to be removed. To the user, it makes
600
+ * no difference that they're separate entities in the DOM tree. So, merge
601
+ * them before removal.
602
+ */
603
+ element.mergeSiblings();
604
+ removeFromElement( this, element );
605
+
606
+ }
607
+ }
608
+ }
609
+
610
+ // Re-create the style tree after/before the boundary element,
611
+ // the replication start from bookmark start node to define the
612
+ // new range.
613
+ if ( boundaryElement )
614
+ {
615
+ var clonedElement = startNode;
616
+ for ( i = 0 ;; i++ )
617
+ {
618
+ var newElement = startPath.elements[ i ];
619
+ if ( newElement.equals( boundaryElement ) )
620
+ break;
621
+ // Avoid copying any matched element.
622
+ else if ( newElement.match )
623
+ continue;
624
+ else
625
+ newElement = newElement.clone();
626
+ newElement.append( clonedElement );
627
+ clonedElement = newElement;
628
+ }
629
+ clonedElement[ boundaryElement.match == 'start' ?
630
+ 'insertBefore' : 'insertAfter' ]( boundaryElement );
631
+ }
632
+ }
633
+ else
634
+ {
635
+ /*
636
+ * Now our range isn't collapsed. Lets walk from the start node to the end
637
+ * node via DFS and remove the styles one-by-one.
638
+ */
639
+ var endNode = bookmark.endNode,
640
+ me = this;
641
+
642
+ /*
643
+ * Find out the style ancestor that needs to be broken down at startNode
644
+ * and endNode.
645
+ */
646
+ function breakNodes()
647
+ {
648
+ var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
649
+ endPath = new CKEDITOR.dom.elementPath( endNode.getParent() ),
650
+ breakStart = null,
651
+ breakEnd = null;
652
+ for ( var i = 0 ; i < startPath.elements.length ; i++ )
653
+ {
654
+ var element = startPath.elements[ i ];
655
+
656
+ if ( element == startPath.block || element == startPath.blockLimit )
657
+ break;
658
+
659
+ if ( me.checkElementRemovable( element ) )
660
+ breakStart = element;
661
+ }
662
+ for ( i = 0 ; i < endPath.elements.length ; i++ )
663
+ {
664
+ element = endPath.elements[ i ];
665
+
666
+ if ( element == endPath.block || element == endPath.blockLimit )
667
+ break;
668
+
669
+ if ( me.checkElementRemovable( element ) )
670
+ breakEnd = element;
671
+ }
672
+
673
+ if ( breakEnd )
674
+ endNode.breakParent( breakEnd );
675
+ if ( breakStart )
676
+ startNode.breakParent( breakStart );
677
+ }
678
+ breakNodes();
679
+
680
+ // Now, do the DFS walk.
681
+ var currentNode = startNode.getNext();
682
+ while ( !currentNode.equals( endNode ) )
683
+ {
684
+ /*
685
+ * Need to get the next node first because removeFromElement() can remove
686
+ * the current node from DOM tree.
687
+ */
688
+ var nextNode = currentNode.getNextSourceNode();
689
+ if ( currentNode.type == CKEDITOR.NODE_ELEMENT && this.checkElementRemovable( currentNode ) )
690
+ {
691
+ // Remove style from element or overriding element.
692
+ if ( currentNode.getName() == this.element )
693
+ removeFromElement( this, currentNode );
694
+ else
695
+ removeOverrides( currentNode, getOverrides( this )[ currentNode.getName() ] );
696
+
697
+ /*
698
+ * removeFromElement() may have merged the next node with something before
699
+ * the startNode via mergeSiblings(). In that case, the nextNode would
700
+ * contain startNode and we'll have to call breakNodes() again and also
701
+ * reassign the nextNode to something after startNode.
702
+ */
703
+ if ( nextNode.type == CKEDITOR.NODE_ELEMENT && nextNode.contains( startNode ) )
704
+ {
705
+ breakNodes();
706
+ nextNode = startNode.getNext();
707
+ }
708
+ }
709
+ currentNode = nextNode;
710
+ }
711
+ }
712
+
713
+ range.moveToBookmark( bookmark );
714
+ }
715
+
716
+ function applyObjectStyle( range )
717
+ {
718
+ var root = range.getCommonAncestor( true, true ),
719
+ element = root.getAscendant( this.element, true );
720
+ element && setupElement( element, this );
721
+ }
722
+
723
+ function applyBlockStyle( range )
724
+ {
725
+ // Serializible bookmarks is needed here since
726
+ // elements may be merged.
727
+ var bookmark = range.createBookmark( true );
728
+
729
+ var iterator = range.createIterator();
730
+ iterator.enforceRealBlocks = true;
731
+
732
+ // make recognize <br /> tag as a separator in ENTER_BR mode (#5121)
733
+ if ( this._.enterMode )
734
+ iterator.enlargeBr = ( this._.enterMode != CKEDITOR.ENTER_BR );
735
+
736
+ var block;
737
+ var doc = range.document;
738
+ var previousPreBlock;
739
+
740
+ while ( ( block = iterator.getNextParagraph() ) ) // Only one =
741
+ {
742
+ var newBlock = getElement( this, doc );
743
+ replaceBlock( block, newBlock );
744
+ }
745
+
746
+ range.moveToBookmark( bookmark );
747
+ }
748
+
749
+ // Replace the original block with new one, with special treatment
750
+ // for <pre> blocks to make sure content format is well preserved, and merging/splitting adjacent
751
+ // when necessary.(#3188)
752
+ function replaceBlock( block, newBlock )
753
+ {
754
+ var newBlockIsPre = newBlock.is( 'pre' );
755
+ var blockIsPre = block.is( 'pre' );
756
+
757
+ var isToPre = newBlockIsPre && !blockIsPre;
758
+ var isFromPre = !newBlockIsPre && blockIsPre;
759
+
760
+ if ( isToPre )
761
+ newBlock = toPre( block, newBlock );
762
+ else if ( isFromPre )
763
+ // Split big <pre> into pieces before start to convert.
764
+ newBlock = fromPres( splitIntoPres( block ), newBlock );
765
+ else
766
+ block.moveChildren( newBlock );
767
+
768
+ newBlock.replace( block );
769
+
770
+ if ( newBlockIsPre )
771
+ {
772
+ // Merge previous <pre> blocks.
773
+ mergePre( newBlock );
774
+ }
775
+ }
776
+
777
+ var nonWhitespaces = CKEDITOR.dom.walker.whitespaces( true );
778
+ /**
779
+ * Merge a <pre> block with a previous sibling if available.
780
+ */
781
+ function mergePre( preBlock )
782
+ {
783
+ var previousBlock;
784
+ if ( !( ( previousBlock = preBlock.getPrevious( nonWhitespaces ) )
785
+ && previousBlock.is
786
+ && previousBlock.is( 'pre') ) )
787
+ return;
788
+
789
+ // Merge the previous <pre> block contents into the current <pre>
790
+ // block.
791
+ //
792
+ // Another thing to be careful here is that currentBlock might contain
793
+ // a '\n' at the beginning, and previousBlock might contain a '\n'
794
+ // towards the end. These new lines are not normally displayed but they
795
+ // become visible after merging.
796
+ var mergedHtml = replace( previousBlock.getHtml(), /\n$/, '' ) + '\n\n' +
797
+ replace( preBlock.getHtml(), /^\n/, '' ) ;
798
+
799
+ // Krugle: IE normalizes innerHTML from <pre>, breaking whitespaces.
800
+ if ( CKEDITOR.env.ie )
801
+ preBlock.$.outerHTML = '<pre>' + mergedHtml + '</pre>';
802
+ else
803
+ preBlock.setHtml( mergedHtml );
804
+
805
+ previousBlock.remove();
806
+ }
807
+
808
+ /**
809
+ * Split into multiple <pre> blocks separated by double line-break.
810
+ * @param preBlock
811
+ */
812
+ function splitIntoPres( preBlock )
813
+ {
814
+ // Exclude the ones at header OR at tail,
815
+ // and ignore bookmark content between them.
816
+ var duoBrRegex = /(\S\s*)\n(?:\s|(<span[^>]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,
817
+ blockName = preBlock.getName(),
818
+ splitedHtml = replace( preBlock.getOuterHtml(),
819
+ duoBrRegex,
820
+ function( match, charBefore, bookmark )
821
+ {
822
+ return charBefore + '</pre>' + bookmark + '<pre>';
823
+ } );
824
+
825
+ var pres = [];
826
+ splitedHtml.replace( /<pre\b.*?>([\s\S]*?)<\/pre>/gi, function( match, preContent ){
827
+ pres.push( preContent );
828
+ } );
829
+ return pres;
830
+ }
831
+
832
+ // Wrapper function of String::replace without considering of head/tail bookmarks nodes.
833
+ function replace( str, regexp, replacement )
834
+ {
835
+ var headBookmark = '',
836
+ tailBookmark = '';
837
+
838
+ str = str.replace( /(^<span[^>]+_fck_bookmark.*?\/span>)|(<span[^>]+_fck_bookmark.*?\/span>$)/gi,
839
+ function( str, m1, m2 ){
840
+ m1 && ( headBookmark = m1 );
841
+ m2 && ( tailBookmark = m2 );
842
+ return '';
843
+ } );
844
+ return headBookmark + str.replace( regexp, replacement ) + tailBookmark;
845
+ }
846
+ /**
847
+ * Converting a list of <pre> into blocks with format well preserved.
848
+ */
849
+ function fromPres( preHtmls, newBlock )
850
+ {
851
+ var docFrag = new CKEDITOR.dom.documentFragment( newBlock.getDocument() );
852
+ for ( var i = 0 ; i < preHtmls.length ; i++ )
853
+ {
854
+ var blockHtml = preHtmls[ i ];
855
+
856
+ // 1. Trim the first and last line-breaks immediately after and before <pre>,
857
+ // they're not visible.
858
+ blockHtml = blockHtml.replace( /(\r\n|\r)/g, '\n' ) ;
859
+ blockHtml = replace( blockHtml, /^[ \t]*\n/, '' ) ;
860
+ blockHtml = replace( blockHtml, /\n$/, '' ) ;
861
+ // 2. Convert spaces or tabs at the beginning or at the end to &nbsp;
862
+ blockHtml = replace( blockHtml, /^[ \t]+|[ \t]+$/g, function( match, offset, s )
863
+ {
864
+ if ( match.length == 1 ) // one space, preserve it
865
+ return '&nbsp;' ;
866
+ else if ( !offset ) // beginning of block
867
+ return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' ';
868
+ else // end of block
869
+ return ' ' + CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 );
870
+ } ) ;
871
+
872
+ // 3. Convert \n to <BR>.
873
+ // 4. Convert contiguous (i.e. non-singular) spaces or tabs to &nbsp;
874
+ blockHtml = blockHtml.replace( /\n/g, '<br>' ) ;
875
+ blockHtml = blockHtml.replace( /[ \t]{2,}/g,
876
+ function ( match )
877
+ {
878
+ return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' ' ;
879
+ } ) ;
880
+
881
+ var newBlockClone = newBlock.clone();
882
+ newBlockClone.setHtml( blockHtml );
883
+ docFrag.append( newBlockClone );
884
+ }
885
+ return docFrag;
886
+ }
887
+
888
+ /**
889
+ * Converting from a non-PRE block to a PRE block in formatting operations.
890
+ */
891
+ function toPre( block, newBlock )
892
+ {
893
+ // First trim the block content.
894
+ var preHtml = block.getHtml();
895
+
896
+ // 1. Trim head/tail spaces, they're not visible.
897
+ preHtml = replace( preHtml, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, '' );
898
+ // 2. Delete ANSI whitespaces immediately before and after <BR> because
899
+ // they are not visible.
900
+ preHtml = preHtml.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '$1' );
901
+ // 3. Compress other ANSI whitespaces since they're only visible as one
902
+ // single space previously.
903
+ // 4. Convert &nbsp; to spaces since &nbsp; is no longer needed in <PRE>.
904
+ preHtml = preHtml.replace( /([ \t\n\r]+|&nbsp;)/g, ' ' );
905
+ // 5. Convert any <BR /> to \n. This must not be done earlier because
906
+ // the \n would then get compressed.
907
+ preHtml = preHtml.replace( /<br\b[^>]*>/gi, '\n' );
908
+
909
+ // Krugle: IE normalizes innerHTML to <pre>, breaking whitespaces.
910
+ if ( CKEDITOR.env.ie )
911
+ {
912
+ var temp = block.getDocument().createElement( 'div' );
913
+ temp.append( newBlock );
914
+ newBlock.$.outerHTML = '<pre>' + preHtml + '</pre>';
915
+ newBlock = temp.getFirst().remove();
916
+ }
917
+ else
918
+ newBlock.setHtml( preHtml );
919
+
920
+ return newBlock;
921
+ }
922
+
923
+ // Removes a style from an element itself, don't care about its subtree.
924
+ function removeFromElement( style, element )
925
+ {
926
+ var def = style._.definition,
927
+ attributes = CKEDITOR.tools.extend( {}, def.attributes, getOverrides( style )[ element.getName() ] ),
928
+ styles = def.styles,
929
+ // If the style is only about the element itself, we have to remove the element.
930
+ removeEmpty = CKEDITOR.tools.isEmpty( attributes ) && CKEDITOR.tools.isEmpty( styles );
931
+
932
+ // Remove definition attributes/style from the elemnt.
933
+ for ( var attName in attributes )
934
+ {
935
+ // The 'class' element value must match (#1318).
936
+ if ( ( attName == 'class' || style._.definition.fullMatch )
937
+ && element.getAttribute( attName ) != normalizeProperty( attName, attributes[ attName ] ) )
938
+ continue;
939
+ removeEmpty = element.hasAttribute( attName );
940
+ element.removeAttribute( attName );
941
+ }
942
+
943
+ for ( var styleName in styles )
944
+ {
945
+ // Full match style insist on having fully equivalence. (#5018)
946
+ if ( style._.definition.fullMatch
947
+ && element.getStyle( styleName ) != normalizeProperty( styleName, styles[ styleName ], true ) )
948
+ continue;
949
+
950
+ removeEmpty = removeEmpty || !!element.getStyle( styleName );
951
+ element.removeStyle( styleName );
952
+ }
953
+
954
+ removeEmpty && removeNoAttribsElement( element );
955
+ }
956
+
957
+ // Removes a style from inside an element.
958
+ function removeFromInsideElement( style, element )
959
+ {
960
+ var def = style._.definition,
961
+ attribs = def.attributes,
962
+ styles = def.styles,
963
+ overrides = getOverrides( style );
964
+
965
+ var innerElements = element.getElementsByTag( style.element );
966
+
967
+ for ( var i = innerElements.count(); --i >= 0 ; )
968
+ removeFromElement( style, innerElements.getItem( i ) );
969
+
970
+ // Now remove any other element with different name that is
971
+ // defined to be overriden.
972
+ for ( var overrideElement in overrides )
973
+ {
974
+ if ( overrideElement != style.element )
975
+ {
976
+ innerElements = element.getElementsByTag( overrideElement ) ;
977
+ for ( i = innerElements.count() - 1 ; i >= 0 ; i-- )
978
+ {
979
+ var innerElement = innerElements.getItem( i );
980
+ removeOverrides( innerElement, overrides[ overrideElement ] ) ;
981
+ }
982
+ }
983
+ }
984
+
985
+ }
986
+
987
+ /**
988
+ * Remove overriding styles/attributes from the specific element.
989
+ * Note: Remove the element if no attributes remain.
990
+ * @param {Object} element
991
+ * @param {Object} overrides
992
+ */
993
+ function removeOverrides( element, overrides )
994
+ {
995
+ var attributes = overrides && overrides.attributes ;
996
+
997
+ if ( attributes )
998
+ {
999
+ for ( var i = 0 ; i < attributes.length ; i++ )
1000
+ {
1001
+ var attName = attributes[i][0], actualAttrValue ;
1002
+
1003
+ if ( ( actualAttrValue = element.getAttribute( attName ) ) )
1004
+ {
1005
+ var attValue = attributes[i][1] ;
1006
+
1007
+ // Remove the attribute if:
1008
+ // - The override definition value is null ;
1009
+ // - The override definition valie is a string that
1010
+ // matches the attribute value exactly.
1011
+ // - The override definition value is a regex that
1012
+ // has matches in the attribute value.
1013
+ if ( attValue === null ||
1014
+ ( attValue.test && attValue.test( actualAttrValue ) ) ||
1015
+ ( typeof attValue == 'string' && actualAttrValue == attValue ) )
1016
+ element.removeAttribute( attName ) ;
1017
+ }
1018
+ }
1019
+ }
1020
+
1021
+ removeNoAttribsElement( element );
1022
+ }
1023
+
1024
+ // If the element has no more attributes, remove it.
1025
+ function removeNoAttribsElement( element )
1026
+ {
1027
+ // If no more attributes remained in the element, remove it,
1028
+ // leaving its children.
1029
+ if ( !element.hasAttributes() )
1030
+ {
1031
+ // Removing elements may open points where merging is possible,
1032
+ // so let's cache the first and last nodes for later checking.
1033
+ var firstChild = element.getFirst();
1034
+ var lastChild = element.getLast();
1035
+
1036
+ element.remove( true );
1037
+
1038
+ if ( firstChild )
1039
+ {
1040
+ // Check the cached nodes for merging.
1041
+ firstChild.type == CKEDITOR.NODE_ELEMENT && firstChild.mergeSiblings();
1042
+
1043
+ if ( lastChild && !firstChild.equals( lastChild )
1044
+ && lastChild.type == CKEDITOR.NODE_ELEMENT )
1045
+ lastChild.mergeSiblings();
1046
+ }
1047
+ }
1048
+ }
1049
+
1050
+ function getElement( style, targetDocument )
1051
+ {
1052
+ var el;
1053
+
1054
+ var def = style._.definition;
1055
+
1056
+ var elementName = style.element;
1057
+
1058
+ // The "*" element name will always be a span for this function.
1059
+ if ( elementName == '*' )
1060
+ elementName = 'span';
1061
+
1062
+ // Create the element.
1063
+ el = new CKEDITOR.dom.element( elementName, targetDocument );
1064
+
1065
+ return setupElement( el, style );
1066
+ }
1067
+
1068
+ function setupElement( el, style )
1069
+ {
1070
+ var def = style._.definition;
1071
+ var attributes = def.attributes;
1072
+ var styles = CKEDITOR.style.getStyleText( def );
1073
+
1074
+ // Assign all defined attributes.
1075
+ if ( attributes )
1076
+ {
1077
+ for ( var att in attributes )
1078
+ {
1079
+ el.setAttribute( att, attributes[ att ] );
1080
+ }
1081
+ }
1082
+
1083
+ // Assign all defined styles.
1084
+ if ( styles )
1085
+ el.setAttribute( 'style', styles );
1086
+
1087
+ return el;
1088
+ }
1089
+
1090
+ var varRegex = /#\((.+?)\)/g;
1091
+ function replaceVariables( list, variablesValues )
1092
+ {
1093
+ for ( var item in list )
1094
+ {
1095
+ list[ item ] = list[ item ].replace( varRegex, function( match, varName )
1096
+ {
1097
+ return variablesValues[ varName ];
1098
+ });
1099
+ }
1100
+ }
1101
+
1102
+
1103
+ // Returns an object that can be used for style matching comparison.
1104
+ // Attributes names and values are all lowercased, and the styles get
1105
+ // merged with the style attribute.
1106
+ function getAttributesForComparison( styleDefinition )
1107
+ {
1108
+ // If we have already computed it, just return it.
1109
+ var attribs = styleDefinition._AC;
1110
+ if ( attribs )
1111
+ return attribs;
1112
+
1113
+ attribs = {};
1114
+
1115
+ var length = 0;
1116
+
1117
+ // Loop through all defined attributes.
1118
+ var styleAttribs = styleDefinition.attributes;
1119
+ if ( styleAttribs )
1120
+ {
1121
+ for ( var styleAtt in styleAttribs )
1122
+ {
1123
+ length++;
1124
+ attribs[ styleAtt ] = styleAttribs[ styleAtt ];
1125
+ }
1126
+ }
1127
+
1128
+ // Includes the style definitions.
1129
+ var styleText = CKEDITOR.style.getStyleText( styleDefinition );
1130
+ if ( styleText )
1131
+ {
1132
+ if ( !attribs[ 'style' ] )
1133
+ length++;
1134
+ attribs[ 'style' ] = styleText;
1135
+ }
1136
+
1137
+ // Appends the "length" information to the object.
1138
+ attribs._length = length;
1139
+
1140
+ // Return it, saving it to the next request.
1141
+ return ( styleDefinition._AC = attribs );
1142
+ }
1143
+
1144
+ /**
1145
+ * Get the the collection used to compare the elements and attributes,
1146
+ * defined in this style overrides, with other element. All information in
1147
+ * it is lowercased.
1148
+ * @param {CKEDITOR.style} style
1149
+ */
1150
+ function getOverrides( style )
1151
+ {
1152
+ if ( style._.overrides )
1153
+ return style._.overrides;
1154
+
1155
+ var overrides = ( style._.overrides = {} ),
1156
+ definition = style._.definition.overrides;
1157
+
1158
+ if ( definition )
1159
+ {
1160
+ // The override description can be a string, object or array.
1161
+ // Internally, well handle arrays only, so transform it if needed.
1162
+ if ( !CKEDITOR.tools.isArray( definition ) )
1163
+ definition = [ definition ];
1164
+
1165
+ // Loop through all override definitions.
1166
+ for ( var i = 0 ; i < definition.length ; i++ )
1167
+ {
1168
+ var override = definition[i];
1169
+ var elementName;
1170
+ var overrideEl;
1171
+ var attrs;
1172
+
1173
+ // If can be a string with the element name.
1174
+ if ( typeof override == 'string' )
1175
+ elementName = override.toLowerCase();
1176
+ // Or an object.
1177
+ else
1178
+ {
1179
+ elementName = override.element ? override.element.toLowerCase() : style.element;
1180
+ attrs = override.attributes;
1181
+ }
1182
+
1183
+ // We can have more than one override definition for the same
1184
+ // element name, so we attempt to simply append information to
1185
+ // it if it already exists.
1186
+ overrideEl = overrides[ elementName ] || ( overrides[ elementName ] = {} );
1187
+
1188
+ if ( attrs )
1189
+ {
1190
+ // The returning attributes list is an array, because we
1191
+ // could have different override definitions for the same
1192
+ // attribute name.
1193
+ var overrideAttrs = ( overrideEl.attributes = overrideEl.attributes || new Array() );
1194
+ for ( var attName in attrs )
1195
+ {
1196
+ // Each item in the attributes array is also an array,
1197
+ // where [0] is the attribute name and [1] is the
1198
+ // override value.
1199
+ overrideAttrs.push( [ attName.toLowerCase(), attrs[ attName ] ] );
1200
+ }
1201
+ }
1202
+ }
1203
+ }
1204
+
1205
+ return overrides;
1206
+ }
1207
+
1208
+ // Make the comparison of attribute value easier by standardizing it.
1209
+ function normalizeProperty( name, value, isStyle )
1210
+ {
1211
+ var temp = new CKEDITOR.dom.element( 'span' );
1212
+ temp [ isStyle ? 'setStyle' : 'setAttribute' ]( name, value );
1213
+ return temp[ isStyle ? 'getStyle' : 'getAttribute' ]( name );
1214
+ }
1215
+
1216
+ // Make the comparison of style text easier by standardizing it.
1217
+ function normalizeCssText( unparsedCssText, nativeNormalize )
1218
+ {
1219
+ var styleText;
1220
+ if ( nativeNormalize !== false )
1221
+ {
1222
+ // Injects the style in a temporary span object, so the browser parses it,
1223
+ // retrieving its final format.
1224
+ var temp = new CKEDITOR.dom.element( 'span' );
1225
+ temp.setAttribute( 'style', unparsedCssText );
1226
+ styleText = temp.getAttribute( 'style' ) || '';
1227
+ }
1228
+ else
1229
+ styleText = unparsedCssText;
1230
+
1231
+ // Shrinking white-spaces around colon and semi-colon (#4147).
1232
+ // Compensate tail semi-colon.
1233
+ return styleText.replace( /\s*([;:])\s*/, '$1' )
1234
+ .replace( /([^\s;])$/, '$1;')
1235
+ .replace( /,\s+/g, ',' ) // Trimming spaces after comma (e.g. font-family name)(#4107).
1236
+ .toLowerCase();
1237
+ }
1238
+
1239
+ // Turn inline style text properties into one hash.
1240
+ function parseStyleText( styleText )
1241
+ {
1242
+ var retval = {};
1243
+ styleText
1244
+ .replace( /&quot;/g, '"' )
1245
+ .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value )
1246
+ {
1247
+ retval[ name ] = value;
1248
+ } );
1249
+ return retval;
1250
+ }
1251
+
1252
+ /**
1253
+ * Compare two bunch of styles, with the speciality that value 'inherit'
1254
+ * is treated as a wildcard which will match any value.
1255
+ * @param {Object|String} source
1256
+ * @param {Object|String} target
1257
+ */
1258
+ function compareCssText( source, target )
1259
+ {
1260
+ typeof source == 'string' && ( source = parseStyleText( source ) );
1261
+ typeof target == 'string' && ( target = parseStyleText( target ) );
1262
+ for( var name in source )
1263
+ {
1264
+ if ( !( name in target &&
1265
+ ( target[ name ] == source[ name ]
1266
+ || source[ name ] == 'inherit'
1267
+ || target[ name ] == 'inherit' ) ) )
1268
+ {
1269
+ return false;
1270
+ }
1271
+ }
1272
+ return true;
1273
+ }
1274
+
1275
+ function applyStyle( document, remove )
1276
+ {
1277
+ // Get all ranges from the selection.
1278
+ var selection = document.getSelection();
1279
+ var ranges = selection.getRanges();
1280
+ var func = remove ? this.removeFromRange : this.applyToRange;
1281
+
1282
+ // Apply the style to the ranges.
1283
+ for ( var i = 0 ; i < ranges.length ; i++ )
1284
+ func.call( this, ranges[ i ] );
1285
+
1286
+ // Select the ranges again.
1287
+ selection.selectRanges( ranges );
1288
+ }
1289
+ })();
1290
+
1291
+ CKEDITOR.styleCommand = function( style )
1292
+ {
1293
+ this.style = style;
1294
+ };
1295
+
1296
+ CKEDITOR.styleCommand.prototype.exec = function( editor )
1297
+ {
1298
+ editor.focus();
1299
+
1300
+ var doc = editor.document;
1301
+
1302
+ if ( doc )
1303
+ {
1304
+ if ( this.state == CKEDITOR.TRISTATE_OFF )
1305
+ this.style.apply( doc );
1306
+ else if ( this.state == CKEDITOR.TRISTATE_ON )
1307
+ this.style.remove( doc );
1308
+ }
1309
+
1310
+ return !!doc;
1311
+ };
1312
+
1313
+ CKEDITOR.stylesSet = new CKEDITOR.resourceManager( '', 'stylesSet' );
1314
+
1315
+ // Backward compatibility (#5025).
1316
+ CKEDITOR.addStylesSet = CKEDITOR.tools.bind( CKEDITOR.stylesSet.add, CKEDITOR.stylesSet );
1317
+ CKEDITOR.loadStylesSet = function( name, url, callback )
1318
+ {
1319
+ CKEDITOR.stylesSet.addExternal( name, url, '' );
1320
+ CKEDITOR.stylesSet.load( name, callback );
1321
+ };
1322
+
1323
+
1324
+ /**
1325
+ * Gets the current styleSet for this instance
1326
+ * @param {Function} The function to be called with the styles data.
1327
+ * @example
1328
+ * editor.getStylesSet( function( stylesDefinitions ) {} );
1329
+ */
1330
+ CKEDITOR.editor.prototype.getStylesSet = function( callback )
1331
+ {
1332
+ if ( !this._.stylesDefinitions )
1333
+ {
1334
+ var editor = this,
1335
+ // Respect the backwards compatible definition entry
1336
+ configStyleSet = editor.config.stylesCombo_stylesSet || editor.config.stylesSet || 'default';
1337
+
1338
+ // #5352 Allow to define the styles directly in the config object
1339
+ if ( configStyleSet instanceof Array )
1340
+ {
1341
+ editor._.stylesDefinitions = configStyleSet;
1342
+ callback( configStyleSet );
1343
+ return;
1344
+ }
1345
+
1346
+ var partsStylesSet = configStyleSet.split( ':' ),
1347
+ styleSetName = partsStylesSet[ 0 ],
1348
+ externalPath = partsStylesSet[ 1 ],
1349
+ pluginPath = CKEDITOR.plugins.registered.styles.path;
1350
+
1351
+ CKEDITOR.stylesSet.addExternal( styleSetName,
1352
+ externalPath ?
1353
+ partsStylesSet.slice( 1 ).join( ':' ) :
1354
+ pluginPath + 'styles/' + styleSetName + '.js', '' );
1355
+
1356
+ CKEDITOR.stylesSet.load( styleSetName, function( stylesSet )
1357
+ {
1358
+ editor._.stylesDefinitions = stylesSet[ styleSetName ];
1359
+ callback( editor._.stylesDefinitions );
1360
+ } ) ;
1361
+ }
1362
+ else
1363
+ callback( this._.stylesDefinitions );
1364
+ };
1365
+
1366
+ /**
1367
+ * The "styles definition set" to use in the editor. They will be used in the
1368
+ * styles combo and the Style selector of the div container. <br>
1369
+ * The styles may be defined in the page containing the editor, or can be
1370
+ * loaded on demand from an external file. In the second case, if this setting
1371
+ * contains only a name, the styles definition file will be loaded from the
1372
+ * "styles" folder inside the styles plugin folder.
1373
+ * Otherwise, this setting has the "name:url" syntax, making it
1374
+ * possible to set the URL from which loading the styles file.<br>
1375
+ * Previously this setting was available as config.stylesCombo_stylesSet<br>
1376
+ * @name CKEDITOR.config.stylesSet
1377
+ * @type String|Array
1378
+ * @default 'default'
1379
+ * @since 3.3
1380
+ * @example
1381
+ * // Load from the styles' styles folder (mystyles.js file).
1382
+ * config.stylesSet = 'mystyles';
1383
+ * @example
1384
+ * // Load from a relative URL.
1385
+ * config.stylesSet = 'mystyles:/editorstyles/styles.js';
1386
+ * @example
1387
+ * // Load from a full URL.
1388
+ * config.stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';
1389
+ * @example
1390
+ * // Load from a list of definitions.
1391
+ * config.stylesSet = [
1392
+ * { name : 'Strong Emphasis', element : 'strong' },
1393
+ * { name : 'Emphasis', element : 'em' }, ... ];
1394
+ */