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,116 @@
1
+ /*
2
+ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ (function()
7
+ {
8
+ // Elements that may be considered the "Block boundary" in an element path.
9
+ var pathBlockElements = { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1 };
10
+
11
+ // Elements that may be considered the "Block limit" in an element path.
12
+ var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1 };
13
+
14
+ // Check if an element contains any block element.
15
+ var checkHasBlock = function( element )
16
+ {
17
+ var childNodes = element.getChildren();
18
+
19
+ for ( var i = 0, count = childNodes.count() ; i < count ; i++ )
20
+ {
21
+ var child = childNodes.getItem( i );
22
+
23
+ if ( child.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[ child.getName() ] )
24
+ return true;
25
+ }
26
+
27
+ return false;
28
+ };
29
+
30
+ CKEDITOR.dom.elementPath = function( lastNode )
31
+ {
32
+ var block = null;
33
+ var blockLimit = null;
34
+ var elements = [];
35
+
36
+ var e = lastNode;
37
+
38
+ while ( e )
39
+ {
40
+ if ( e.type == CKEDITOR.NODE_ELEMENT )
41
+ {
42
+ if ( !this.lastElement )
43
+ this.lastElement = e;
44
+
45
+ var elementName = e.getName();
46
+ if ( CKEDITOR.env.ie && e.$.scopeName != 'HTML' )
47
+ elementName = e.$.scopeName.toLowerCase() + ':' + elementName;
48
+
49
+ if ( !blockLimit )
50
+ {
51
+ if ( !block && pathBlockElements[ elementName ] )
52
+ block = e;
53
+
54
+ if ( pathBlockLimitElements[ elementName ] )
55
+ {
56
+ // DIV is considered the Block, if no block is available (#525)
57
+ // and if it doesn't contain other blocks.
58
+ if ( !block && elementName == 'div' && !checkHasBlock( e ) )
59
+ block = e;
60
+ else
61
+ blockLimit = e;
62
+ }
63
+ }
64
+
65
+ elements.push( e );
66
+
67
+ if ( elementName == 'body' )
68
+ break;
69
+ }
70
+ e = e.getParent();
71
+ }
72
+
73
+ this.block = block;
74
+ this.blockLimit = blockLimit;
75
+ this.elements = elements;
76
+ };
77
+ })();
78
+
79
+ CKEDITOR.dom.elementPath.prototype =
80
+ {
81
+ /**
82
+ * Compares this element path with another one.
83
+ * @param {CKEDITOR.dom.elementPath} otherPath The elementPath object to be
84
+ * compared with this one.
85
+ * @returns {Boolean} "true" if the paths are equal, containing the same
86
+ * number of elements and the same elements in the same order.
87
+ */
88
+ compare : function( otherPath )
89
+ {
90
+ var thisElements = this.elements;
91
+ var otherElements = otherPath && otherPath.elements;
92
+
93
+ if ( !otherElements || thisElements.length != otherElements.length )
94
+ return false;
95
+
96
+ for ( var i = 0 ; i < thisElements.length ; i++ )
97
+ {
98
+ if ( !thisElements[ i ].equals( otherElements[ i ] ) )
99
+ return false;
100
+ }
101
+
102
+ return true;
103
+ },
104
+
105
+ contains : function( tagNames )
106
+ {
107
+ var elements = this.elements;
108
+ for ( var i = 0 ; i < elements.length ; i++ )
109
+ {
110
+ if ( elements[ i ].getName() in tagNames )
111
+ return elements[ i ];
112
+ }
113
+
114
+ return null;
115
+ }
116
+ };
@@ -0,0 +1,1865 @@
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.dom.range = function( document )
7
+ {
8
+ this.startContainer = null;
9
+ this.startOffset = null;
10
+ this.endContainer = null;
11
+ this.endOffset = null;
12
+ this.collapsed = true;
13
+
14
+ this.document = document;
15
+ };
16
+
17
+ (function()
18
+ {
19
+ // Updates the "collapsed" property for the given range object.
20
+ var updateCollapsed = function( range )
21
+ {
22
+ range.collapsed = (
23
+ range.startContainer &&
24
+ range.endContainer &&
25
+ range.startContainer.equals( range.endContainer ) &&
26
+ range.startOffset == range.endOffset );
27
+ };
28
+
29
+ // This is a shared function used to delete, extract and clone the range
30
+ // contents.
31
+ // V2
32
+ var execContentsAction = function( range, action, docFrag )
33
+ {
34
+ range.optimizeBookmark();
35
+
36
+ var startNode = range.startContainer;
37
+ var endNode = range.endContainer;
38
+
39
+ var startOffset = range.startOffset;
40
+ var endOffset = range.endOffset;
41
+
42
+ var removeStartNode;
43
+ var removeEndNode;
44
+
45
+ // For text containers, we must simply split the node and point to the
46
+ // second part. The removal will be handled by the rest of the code .
47
+ if ( endNode.type == CKEDITOR.NODE_TEXT )
48
+ endNode = endNode.split( endOffset );
49
+ else
50
+ {
51
+ // If the end container has children and the offset is pointing
52
+ // to a child, then we should start from it.
53
+ if ( endNode.getChildCount() > 0 )
54
+ {
55
+ // If the offset points after the last node.
56
+ if ( endOffset >= endNode.getChildCount() )
57
+ {
58
+ // Let's create a temporary node and mark it for removal.
59
+ endNode = endNode.append( range.document.createText( '' ) );
60
+ removeEndNode = true;
61
+ }
62
+ else
63
+ endNode = endNode.getChild( endOffset );
64
+ }
65
+ }
66
+
67
+ // For text containers, we must simply split the node. The removal will
68
+ // be handled by the rest of the code .
69
+ if ( startNode.type == CKEDITOR.NODE_TEXT )
70
+ {
71
+ startNode.split( startOffset );
72
+
73
+ // In cases the end node is the same as the start node, the above
74
+ // splitting will also split the end, so me must move the end to
75
+ // the second part of the split.
76
+ if ( startNode.equals( endNode ) )
77
+ endNode = startNode.getNext();
78
+ }
79
+ else
80
+ {
81
+ // If the start container has children and the offset is pointing
82
+ // to a child, then we should start from its previous sibling.
83
+
84
+ // If the offset points to the first node, we don't have a
85
+ // sibling, so let's use the first one, but mark it for removal.
86
+ if ( !startOffset )
87
+ {
88
+ // Let's create a temporary node and mark it for removal.
89
+ startNode = startNode.getFirst().insertBeforeMe( range.document.createText( '' ) );
90
+ removeStartNode = true;
91
+ }
92
+ else if ( startOffset >= startNode.getChildCount() )
93
+ {
94
+ // Let's create a temporary node and mark it for removal.
95
+ startNode = startNode.append( range.document.createText( '' ) );
96
+ removeStartNode = true;
97
+ }
98
+ else
99
+ startNode = startNode.getChild( startOffset ).getPrevious();
100
+ }
101
+
102
+ // Get the parent nodes tree for the start and end boundaries.
103
+ var startParents = startNode.getParents();
104
+ var endParents = endNode.getParents();
105
+
106
+ // Compare them, to find the top most siblings.
107
+ var i, topStart, topEnd;
108
+
109
+ for ( i = 0 ; i < startParents.length ; i++ )
110
+ {
111
+ topStart = startParents[ i ];
112
+ topEnd = endParents[ i ];
113
+
114
+ // The compared nodes will match until we find the top most
115
+ // siblings (different nodes that have the same parent).
116
+ // "i" will hold the index in the parents array for the top
117
+ // most element.
118
+ if ( !topStart.equals( topEnd ) )
119
+ break;
120
+ }
121
+
122
+ var clone = docFrag, levelStartNode, levelClone, currentNode, currentSibling;
123
+
124
+ // Remove all successive sibling nodes for every node in the
125
+ // startParents tree.
126
+ for ( var j = i ; j < startParents.length ; j++ )
127
+ {
128
+ levelStartNode = startParents[j];
129
+
130
+ // For Extract and Clone, we must clone this level.
131
+ if ( clone && !levelStartNode.equals( startNode ) ) // action = 0 = Delete
132
+ levelClone = clone.append( levelStartNode.clone() );
133
+
134
+ currentNode = levelStartNode.getNext();
135
+
136
+ while ( currentNode )
137
+ {
138
+ // Stop processing when the current node matches a node in the
139
+ // endParents tree or if it is the endNode.
140
+ if ( currentNode.equals( endParents[ j ] ) || currentNode.equals( endNode ) )
141
+ break;
142
+
143
+ // Cache the next sibling.
144
+ currentSibling = currentNode.getNext();
145
+
146
+ // If cloning, just clone it.
147
+ if ( action == 2 ) // 2 = Clone
148
+ clone.append( currentNode.clone( true ) );
149
+ else
150
+ {
151
+ // Both Delete and Extract will remove the node.
152
+ currentNode.remove();
153
+
154
+ // When Extracting, move the removed node to the docFrag.
155
+ if ( action == 1 ) // 1 = Extract
156
+ clone.append( currentNode );
157
+ }
158
+
159
+ currentNode = currentSibling;
160
+ }
161
+
162
+ if ( clone )
163
+ clone = levelClone;
164
+ }
165
+
166
+ clone = docFrag;
167
+
168
+ // Remove all previous sibling nodes for every node in the
169
+ // endParents tree.
170
+ for ( var k = i ; k < endParents.length ; k++ )
171
+ {
172
+ levelStartNode = endParents[ k ];
173
+
174
+ // For Extract and Clone, we must clone this level.
175
+ if ( action > 0 && !levelStartNode.equals( endNode ) ) // action = 0 = Delete
176
+ levelClone = clone.append( levelStartNode.clone() );
177
+
178
+ // The processing of siblings may have already been done by the parent.
179
+ if ( !startParents[ k ] || levelStartNode.$.parentNode != startParents[ k ].$.parentNode )
180
+ {
181
+ currentNode = levelStartNode.getPrevious();
182
+
183
+ while ( currentNode )
184
+ {
185
+ // Stop processing when the current node matches a node in the
186
+ // startParents tree or if it is the startNode.
187
+ if ( currentNode.equals( startParents[ k ] ) || currentNode.equals( startNode ) )
188
+ break;
189
+
190
+ // Cache the next sibling.
191
+ currentSibling = currentNode.getPrevious();
192
+
193
+ // If cloning, just clone it.
194
+ if ( action == 2 ) // 2 = Clone
195
+ clone.$.insertBefore( currentNode.$.cloneNode( true ), clone.$.firstChild ) ;
196
+ else
197
+ {
198
+ // Both Delete and Extract will remove the node.
199
+ currentNode.remove();
200
+
201
+ // When Extracting, mode the removed node to the docFrag.
202
+ if ( action == 1 ) // 1 = Extract
203
+ clone.$.insertBefore( currentNode.$, clone.$.firstChild );
204
+ }
205
+
206
+ currentNode = currentSibling;
207
+ }
208
+ }
209
+
210
+ if ( clone )
211
+ clone = levelClone;
212
+ }
213
+
214
+ if ( action == 2 ) // 2 = Clone.
215
+ {
216
+ // No changes in the DOM should be done, so fix the split text (if any).
217
+
218
+ var startTextNode = range.startContainer;
219
+ if ( startTextNode.type == CKEDITOR.NODE_TEXT )
220
+ {
221
+ startTextNode.$.data += startTextNode.$.nextSibling.data;
222
+ startTextNode.$.parentNode.removeChild( startTextNode.$.nextSibling );
223
+ }
224
+
225
+ var endTextNode = range.endContainer;
226
+ if ( endTextNode.type == CKEDITOR.NODE_TEXT && endTextNode.$.nextSibling )
227
+ {
228
+ endTextNode.$.data += endTextNode.$.nextSibling.data;
229
+ endTextNode.$.parentNode.removeChild( endTextNode.$.nextSibling );
230
+ }
231
+ }
232
+ else
233
+ {
234
+ // Collapse the range.
235
+
236
+ // If a node has been partially selected, collapse the range between
237
+ // topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs).
238
+ if ( topStart && topEnd && ( startNode.$.parentNode != topStart.$.parentNode || endNode.$.parentNode != topEnd.$.parentNode ) )
239
+ {
240
+ var endIndex = topEnd.getIndex();
241
+
242
+ // If the start node is to be removed, we must correct the
243
+ // index to reflect the removal.
244
+ if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode )
245
+ endIndex--;
246
+
247
+ range.setStart( topEnd.getParent(), endIndex );
248
+ }
249
+
250
+ // Collapse it to the start.
251
+ range.collapse( true );
252
+ }
253
+
254
+ // Cleanup any marked node.
255
+ if ( removeStartNode )
256
+ startNode.remove();
257
+
258
+ if ( removeEndNode && endNode.$.parentNode )
259
+ endNode.remove();
260
+ };
261
+
262
+ var inlineChildReqElements = { abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 };
263
+
264
+ // Creates the appropriate node evaluator for the dom walker used inside
265
+ // check(Start|End)OfBlock.
266
+ function getCheckStartEndBlockEvalFunction( isStart )
267
+ {
268
+ var hadBr = false, bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true );
269
+ return function( node )
270
+ {
271
+ // First ignore bookmark nodes.
272
+ if ( bookmarkEvaluator( node ) )
273
+ return true;
274
+
275
+ if ( node.type == CKEDITOR.NODE_TEXT )
276
+ {
277
+ // If there's any visible text, then we're not at the start.
278
+ if ( CKEDITOR.tools.trim( node.getText() ).length )
279
+ return false;
280
+ }
281
+ else if ( node.type == CKEDITOR.NODE_ELEMENT )
282
+ {
283
+ // If there are non-empty inline elements (e.g. <img />), then we're not
284
+ // at the start.
285
+ if ( !inlineChildReqElements[ node.getName() ] )
286
+ {
287
+ // If we're working at the end-of-block, forgive the first <br /> in non-IE
288
+ // browsers.
289
+ if ( !isStart && !CKEDITOR.env.ie && node.getName() == 'br' && !hadBr )
290
+ hadBr = true;
291
+ else
292
+ return false;
293
+ }
294
+ }
295
+ return true;
296
+ };
297
+ }
298
+
299
+ // Evaluator for CKEDITOR.dom.element::checkBoundaryOfElement, reject any
300
+ // text node and non-empty elements unless it's being bookmark text.
301
+ function elementBoundaryEval( node )
302
+ {
303
+ // Reject any text node unless it's being bookmark
304
+ // OR it's spaces. (#3883)
305
+ return node.type != CKEDITOR.NODE_TEXT
306
+ && node.getName() in CKEDITOR.dtd.$removeEmpty
307
+ || !CKEDITOR.tools.trim( node.getText() )
308
+ || node.getParent().hasAttribute( '_fck_bookmark' );
309
+ }
310
+
311
+ var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(),
312
+ bookmarkEval = new CKEDITOR.dom.walker.bookmark();
313
+
314
+ function nonWhitespaceOrBookmarkEval( node )
315
+ {
316
+ // Whitespaces and bookmark nodes are to be ignored.
317
+ return !whitespaceEval( node ) && !bookmarkEval( node );
318
+ }
319
+
320
+ CKEDITOR.dom.range.prototype =
321
+ {
322
+ clone : function()
323
+ {
324
+ var clone = new CKEDITOR.dom.range( this.document );
325
+
326
+ clone.startContainer = this.startContainer;
327
+ clone.startOffset = this.startOffset;
328
+ clone.endContainer = this.endContainer;
329
+ clone.endOffset = this.endOffset;
330
+ clone.collapsed = this.collapsed;
331
+
332
+ return clone;
333
+ },
334
+
335
+ collapse : function( toStart )
336
+ {
337
+ if ( toStart )
338
+ {
339
+ this.endContainer = this.startContainer;
340
+ this.endOffset = this.startOffset;
341
+ }
342
+ else
343
+ {
344
+ this.startContainer = this.endContainer;
345
+ this.startOffset = this.endOffset;
346
+ }
347
+
348
+ this.collapsed = true;
349
+ },
350
+
351
+ // The selection may be lost when cloning (due to the splitText() call).
352
+ cloneContents : function()
353
+ {
354
+ var docFrag = new CKEDITOR.dom.documentFragment( this.document );
355
+
356
+ if ( !this.collapsed )
357
+ execContentsAction( this, 2, docFrag );
358
+
359
+ return docFrag;
360
+ },
361
+
362
+ deleteContents : function()
363
+ {
364
+ if ( this.collapsed )
365
+ return;
366
+
367
+ execContentsAction( this, 0 );
368
+ },
369
+
370
+ extractContents : function()
371
+ {
372
+ var docFrag = new CKEDITOR.dom.documentFragment( this.document );
373
+
374
+ if ( !this.collapsed )
375
+ execContentsAction( this, 1, docFrag );
376
+
377
+ return docFrag;
378
+ },
379
+
380
+ /**
381
+ * Creates a bookmark object, which can be later used to restore the
382
+ * range by using the moveToBookmark function.
383
+ * This is an "intrusive" way to create a bookmark. It includes <span> tags
384
+ * in the range boundaries. The advantage of it is that it is possible to
385
+ * handle DOM mutations when moving back to the bookmark.
386
+ * Attention: the inclusion of nodes in the DOM is a design choice and
387
+ * should not be changed as there are other points in the code that may be
388
+ * using those nodes to perform operations. See GetBookmarkNode.
389
+ * @param {Boolean} [serializable] Indicates that the bookmark nodes
390
+ * must contain ids, which can be used to restore the range even
391
+ * when these nodes suffer mutations (like a clonation or innerHTML
392
+ * change).
393
+ * @returns {Object} And object representing a bookmark.
394
+ */
395
+ createBookmark : function( serializable )
396
+ {
397
+ var startNode, endNode;
398
+ var baseId;
399
+ var clone;
400
+
401
+ startNode = this.document.createElement( 'span' );
402
+ startNode.setAttribute( '_fck_bookmark', 1 );
403
+ startNode.setStyle( 'display', 'none' );
404
+
405
+ // For IE, it must have something inside, otherwise it may be
406
+ // removed during DOM operations.
407
+ startNode.setHtml( '&nbsp;' );
408
+
409
+ if ( serializable )
410
+ {
411
+ baseId = 'cke_bm_' + CKEDITOR.tools.getNextNumber();
412
+ startNode.setAttribute( 'id', baseId + 'S' );
413
+ }
414
+
415
+ // If collapsed, the endNode will not be created.
416
+ if ( !this.collapsed )
417
+ {
418
+ endNode = startNode.clone();
419
+ endNode.setHtml( '&nbsp;' );
420
+
421
+ if ( serializable )
422
+ endNode.setAttribute( 'id', baseId + 'E' );
423
+
424
+ clone = this.clone();
425
+ clone.collapse();
426
+ clone.insertNode( endNode );
427
+ }
428
+
429
+ clone = this.clone();
430
+ clone.collapse( true );
431
+ clone.insertNode( startNode );
432
+
433
+ // Update the range position.
434
+ if ( endNode )
435
+ {
436
+ this.setStartAfter( startNode );
437
+ this.setEndBefore( endNode );
438
+ }
439
+ else
440
+ this.moveToPosition( startNode, CKEDITOR.POSITION_AFTER_END );
441
+
442
+ return {
443
+ startNode : serializable ? baseId + 'S' : startNode,
444
+ endNode : serializable ? baseId + 'E' : endNode,
445
+ serializable : serializable
446
+ };
447
+ },
448
+
449
+ /**
450
+ * Creates a "non intrusive" and "mutation sensible" bookmark. This
451
+ * kind of bookmark should be used only when the DOM is supposed to
452
+ * remain stable after its creation.
453
+ * @param {Boolean} [normalized] Indicates that the bookmark must
454
+ * normalized. When normalized, the successive text nodes are
455
+ * considered a single node. To sucessful load a normalized
456
+ * bookmark, the DOM tree must be also normalized before calling
457
+ * moveToBookmark.
458
+ * @returns {Object} An object representing the bookmark.
459
+ */
460
+ createBookmark2 : function( normalized )
461
+ {
462
+ var startContainer = this.startContainer,
463
+ endContainer = this.endContainer;
464
+
465
+ var startOffset = this.startOffset,
466
+ endOffset = this.endOffset;
467
+
468
+ var child, previous;
469
+
470
+ // If there is no range then get out of here.
471
+ // It happens on initial load in Safari #962 and if the editor it's
472
+ // hidden also in Firefox
473
+ if ( !startContainer || !endContainer )
474
+ return { start : 0, end : 0 };
475
+
476
+ if ( normalized )
477
+ {
478
+ // Find out if the start is pointing to a text node that will
479
+ // be normalized.
480
+ if ( startContainer.type == CKEDITOR.NODE_ELEMENT )
481
+ {
482
+ child = startContainer.getChild( startOffset );
483
+
484
+ // In this case, move the start information to that text
485
+ // node.
486
+ if ( child && child.type == CKEDITOR.NODE_TEXT
487
+ && startOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT )
488
+ {
489
+ startContainer = child;
490
+ startOffset = 0;
491
+ }
492
+ }
493
+
494
+ // Normalize the start.
495
+ while ( startContainer.type == CKEDITOR.NODE_TEXT
496
+ && ( previous = startContainer.getPrevious() )
497
+ && previous.type == CKEDITOR.NODE_TEXT )
498
+ {
499
+ startContainer = previous;
500
+ startOffset += previous.getLength();
501
+ }
502
+
503
+ // Process the end only if not normalized.
504
+ if ( !this.isCollapsed )
505
+ {
506
+ // Find out if the start is pointing to a text node that
507
+ // will be normalized.
508
+ if ( endContainer.type == CKEDITOR.NODE_ELEMENT )
509
+ {
510
+ child = endContainer.getChild( endOffset );
511
+
512
+ // In this case, move the start information to that
513
+ // text node.
514
+ if ( child && child.type == CKEDITOR.NODE_TEXT
515
+ && endOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT )
516
+ {
517
+ endContainer = child;
518
+ endOffset = 0;
519
+ }
520
+ }
521
+
522
+ // Normalize the end.
523
+ while ( endContainer.type == CKEDITOR.NODE_TEXT
524
+ && ( previous = endContainer.getPrevious() )
525
+ && previous.type == CKEDITOR.NODE_TEXT )
526
+ {
527
+ endContainer = previous;
528
+ endOffset += previous.getLength();
529
+ }
530
+ }
531
+ }
532
+
533
+ return {
534
+ start : startContainer.getAddress( normalized ),
535
+ end : this.isCollapsed ? null : endContainer.getAddress( normalized ),
536
+ startOffset : startOffset,
537
+ endOffset : endOffset,
538
+ normalized : normalized,
539
+ is2 : true // It's a createBookmark2 bookmark.
540
+ };
541
+ },
542
+
543
+ moveToBookmark : function( bookmark )
544
+ {
545
+ if ( bookmark.is2 ) // Created with createBookmark2().
546
+ {
547
+ // Get the start information.
548
+ var startContainer = this.document.getByAddress( bookmark.start, bookmark.normalized ),
549
+ startOffset = bookmark.startOffset;
550
+
551
+ // Get the end information.
552
+ var endContainer = bookmark.end && this.document.getByAddress( bookmark.end, bookmark.normalized ),
553
+ endOffset = bookmark.endOffset;
554
+
555
+ // Set the start boundary.
556
+ this.setStart( startContainer, startOffset );
557
+
558
+ // Set the end boundary. If not available, collapse it.
559
+ if ( endContainer )
560
+ this.setEnd( endContainer, endOffset );
561
+ else
562
+ this.collapse( true );
563
+ }
564
+ else // Created with createBookmark().
565
+ {
566
+ var serializable = bookmark.serializable,
567
+ startNode = serializable ? this.document.getById( bookmark.startNode ) : bookmark.startNode,
568
+ endNode = serializable ? this.document.getById( bookmark.endNode ) : bookmark.endNode;
569
+
570
+ // Set the range start at the bookmark start node position.
571
+ this.setStartBefore( startNode );
572
+
573
+ // Remove it, because it may interfere in the setEndBefore call.
574
+ startNode.remove();
575
+
576
+ // Set the range end at the bookmark end node position, or simply
577
+ // collapse it if it is not available.
578
+ if ( endNode )
579
+ {
580
+ this.setEndBefore( endNode );
581
+ endNode.remove();
582
+ }
583
+ else
584
+ this.collapse( true );
585
+ }
586
+ },
587
+
588
+ getBoundaryNodes : function()
589
+ {
590
+ var startNode = this.startContainer,
591
+ endNode = this.endContainer,
592
+ startOffset = this.startOffset,
593
+ endOffset = this.endOffset,
594
+ childCount;
595
+
596
+ if ( startNode.type == CKEDITOR.NODE_ELEMENT )
597
+ {
598
+ childCount = startNode.getChildCount();
599
+ if ( childCount > startOffset )
600
+ startNode = startNode.getChild( startOffset );
601
+ else if ( childCount < 1 )
602
+ startNode = startNode.getPreviousSourceNode();
603
+ else // startOffset > childCount but childCount is not 0
604
+ {
605
+ // Try to take the node just after the current position.
606
+ startNode = startNode.$;
607
+ while ( startNode.lastChild )
608
+ startNode = startNode.lastChild;
609
+ startNode = new CKEDITOR.dom.node( startNode );
610
+
611
+ // Normally we should take the next node in DFS order. But it
612
+ // is also possible that we've already reached the end of
613
+ // document.
614
+ startNode = startNode.getNextSourceNode() || startNode;
615
+ }
616
+ }
617
+ if ( endNode.type == CKEDITOR.NODE_ELEMENT )
618
+ {
619
+ childCount = endNode.getChildCount();
620
+ if ( childCount > endOffset )
621
+ endNode = endNode.getChild( endOffset ).getPreviousSourceNode( true );
622
+ else if ( childCount < 1 )
623
+ endNode = endNode.getPreviousSourceNode();
624
+ else // endOffset > childCount but childCount is not 0
625
+ {
626
+ // Try to take the node just before the current position.
627
+ endNode = endNode.$;
628
+ while ( endNode.lastChild )
629
+ endNode = endNode.lastChild;
630
+ endNode = new CKEDITOR.dom.node( endNode );
631
+ }
632
+ }
633
+
634
+ // Sometimes the endNode will come right before startNode for collapsed
635
+ // ranges. Fix it. (#3780)
636
+ if ( startNode.getPosition( endNode ) & CKEDITOR.POSITION_FOLLOWING )
637
+ startNode = endNode;
638
+
639
+ return { startNode : startNode, endNode : endNode };
640
+ },
641
+
642
+ /**
643
+ * Find the node which fully contains the range.
644
+ * @param includeSelf
645
+ * @param {Boolean} ignoreTextNode Whether ignore CKEDITOR.NODE_TEXT type.
646
+ */
647
+ getCommonAncestor : function( includeSelf , ignoreTextNode )
648
+ {
649
+ var start = this.startContainer,
650
+ end = this.endContainer,
651
+ ancestor;
652
+
653
+ if ( start.equals( end ) )
654
+ {
655
+ if ( includeSelf
656
+ && start.type == CKEDITOR.NODE_ELEMENT
657
+ && this.startOffset == this.endOffset - 1 )
658
+ ancestor = start.getChild( this.startOffset );
659
+ else
660
+ ancestor = start;
661
+ }
662
+ else
663
+ ancestor = start.getCommonAncestor( end );
664
+
665
+ return ignoreTextNode && !ancestor.is ? ancestor.getParent() : ancestor;
666
+ },
667
+
668
+ /**
669
+ * Transforms the startContainer and endContainer properties from text
670
+ * nodes to element nodes, whenever possible. This is actually possible
671
+ * if either of the boundary containers point to a text node, and its
672
+ * offset is set to zero, or after the last char in the node.
673
+ */
674
+ optimize : function()
675
+ {
676
+ var container = this.startContainer;
677
+ var offset = this.startOffset;
678
+
679
+ if ( container.type != CKEDITOR.NODE_ELEMENT )
680
+ {
681
+ if ( !offset )
682
+ this.setStartBefore( container );
683
+ else if ( offset >= container.getLength() )
684
+ this.setStartAfter( container );
685
+ }
686
+
687
+ container = this.endContainer;
688
+ offset = this.endOffset;
689
+
690
+ if ( container.type != CKEDITOR.NODE_ELEMENT )
691
+ {
692
+ if ( !offset )
693
+ this.setEndBefore( container );
694
+ else if ( offset >= container.getLength() )
695
+ this.setEndAfter( container );
696
+ }
697
+ },
698
+
699
+ /**
700
+ * Move the range out of bookmark nodes if they'd been the container.
701
+ */
702
+ optimizeBookmark: function()
703
+ {
704
+ var startNode = this.startContainer,
705
+ endNode = this.endContainer;
706
+
707
+ if ( startNode.is && startNode.is( 'span' )
708
+ && startNode.hasAttribute( '_fck_bookmark' ) )
709
+ this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START );
710
+ if ( endNode && endNode.is && endNode.is( 'span' )
711
+ && endNode.hasAttribute( '_fck_bookmark' ) )
712
+ this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END );
713
+ },
714
+
715
+ trim : function( ignoreStart, ignoreEnd )
716
+ {
717
+ var startContainer = this.startContainer,
718
+ startOffset = this.startOffset,
719
+ collapsed = this.collapsed;
720
+ if ( ( !ignoreStart || collapsed )
721
+ && startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
722
+ {
723
+ // If the offset is zero, we just insert the new node before
724
+ // the start.
725
+ if ( !startOffset )
726
+ {
727
+ startOffset = startContainer.getIndex();
728
+ startContainer = startContainer.getParent();
729
+ }
730
+ // If the offset is at the end, we'll insert it after the text
731
+ // node.
732
+ else if ( startOffset >= startContainer.getLength() )
733
+ {
734
+ startOffset = startContainer.getIndex() + 1;
735
+ startContainer = startContainer.getParent();
736
+ }
737
+ // In other case, we split the text node and insert the new
738
+ // node at the split point.
739
+ else
740
+ {
741
+ var nextText = startContainer.split( startOffset );
742
+
743
+ startOffset = startContainer.getIndex() + 1;
744
+ startContainer = startContainer.getParent();
745
+
746
+ // Check all necessity of updating the end boundary.
747
+ if ( this.startContainer.equals( this.endContainer ) )
748
+ this.setEnd( nextText, this.endOffset - this.startOffset );
749
+ else if ( startContainer.equals( this.endContainer ) )
750
+ this.endOffset += 1;
751
+ }
752
+
753
+ this.setStart( startContainer, startOffset );
754
+
755
+ if ( collapsed )
756
+ {
757
+ this.collapse( true );
758
+ return;
759
+ }
760
+ }
761
+
762
+ var endContainer = this.endContainer;
763
+ var endOffset = this.endOffset;
764
+
765
+ if ( !( ignoreEnd || collapsed )
766
+ && endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
767
+ {
768
+ // If the offset is zero, we just insert the new node before
769
+ // the start.
770
+ if ( !endOffset )
771
+ {
772
+ endOffset = endContainer.getIndex();
773
+ endContainer = endContainer.getParent();
774
+ }
775
+ // If the offset is at the end, we'll insert it after the text
776
+ // node.
777
+ else if ( endOffset >= endContainer.getLength() )
778
+ {
779
+ endOffset = endContainer.getIndex() + 1;
780
+ endContainer = endContainer.getParent();
781
+ }
782
+ // In other case, we split the text node and insert the new
783
+ // node at the split point.
784
+ else
785
+ {
786
+ endContainer.split( endOffset );
787
+
788
+ endOffset = endContainer.getIndex() + 1;
789
+ endContainer = endContainer.getParent();
790
+ }
791
+
792
+ this.setEnd( endContainer, endOffset );
793
+ }
794
+ },
795
+
796
+ enlarge : function( unit )
797
+ {
798
+ switch ( unit )
799
+ {
800
+ case CKEDITOR.ENLARGE_ELEMENT :
801
+
802
+ if ( this.collapsed )
803
+ return;
804
+
805
+ // Get the common ancestor.
806
+ var commonAncestor = this.getCommonAncestor();
807
+
808
+ var body = this.document.getBody();
809
+
810
+ // For each boundary
811
+ // a. Depending on its position, find out the first node to be checked (a sibling) or, if not available, to be enlarge.
812
+ // b. Go ahead checking siblings and enlarging the boundary as much as possible until the common ancestor is not reached. After reaching the common ancestor, just save the enlargeable node to be used later.
813
+
814
+ var startTop, endTop;
815
+
816
+ var enlargeable, sibling, commonReached;
817
+
818
+ // Indicates that the node can be added only if whitespace
819
+ // is available before it.
820
+ var needsWhiteSpace = false;
821
+ var isWhiteSpace;
822
+ var siblingText;
823
+
824
+ // Process the start boundary.
825
+
826
+ var container = this.startContainer;
827
+ var offset = this.startOffset;
828
+
829
+ if ( container.type == CKEDITOR.NODE_TEXT )
830
+ {
831
+ if ( offset )
832
+ {
833
+ // Check if there is any non-space text before the
834
+ // offset. Otherwise, container is null.
835
+ container = !CKEDITOR.tools.trim( container.substring( 0, offset ) ).length && container;
836
+
837
+ // If we found only whitespace in the node, it
838
+ // means that we'll need more whitespace to be able
839
+ // to expand. For example, <i> can be expanded in
840
+ // "A <i> [B]</i>", but not in "A<i> [B]</i>".
841
+ needsWhiteSpace = !!container;
842
+ }
843
+
844
+ if ( container )
845
+ {
846
+ if ( !( sibling = container.getPrevious() ) )
847
+ enlargeable = container.getParent();
848
+ }
849
+ }
850
+ else
851
+ {
852
+ // If we have offset, get the node preceeding it as the
853
+ // first sibling to be checked.
854
+ if ( offset )
855
+ sibling = container.getChild( offset - 1 ) || container.getLast();
856
+
857
+ // If there is no sibling, mark the container to be
858
+ // enlarged.
859
+ if ( !sibling )
860
+ enlargeable = container;
861
+ }
862
+
863
+ while ( enlargeable || sibling )
864
+ {
865
+ if ( enlargeable && !sibling )
866
+ {
867
+ // If we reached the common ancestor, mark the flag
868
+ // for it.
869
+ if ( !commonReached && enlargeable.equals( commonAncestor ) )
870
+ commonReached = true;
871
+
872
+ if ( !body.contains( enlargeable ) )
873
+ break;
874
+
875
+ // If we don't need space or this element breaks
876
+ // the line, then enlarge it.
877
+ if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' )
878
+ {
879
+ needsWhiteSpace = false;
880
+
881
+ // If the common ancestor has been reached,
882
+ // we'll not enlarge it immediately, but just
883
+ // mark it to be enlarged later if the end
884
+ // boundary also enlarges it.
885
+ if ( commonReached )
886
+ startTop = enlargeable;
887
+ else
888
+ this.setStartBefore( enlargeable );
889
+ }
890
+
891
+ sibling = enlargeable.getPrevious();
892
+ }
893
+
894
+ // Check all sibling nodes preceeding the enlargeable
895
+ // node. The node wil lbe enlarged only if none of them
896
+ // blocks it.
897
+ while ( sibling )
898
+ {
899
+ // This flag indicates that this node has
900
+ // whitespaces at the end.
901
+ isWhiteSpace = false;
902
+
903
+ if ( sibling.type == CKEDITOR.NODE_TEXT )
904
+ {
905
+ siblingText = sibling.getText();
906
+
907
+ if ( /[^\s\ufeff]/.test( siblingText ) )
908
+ sibling = null;
909
+
910
+ isWhiteSpace = /[\s\ufeff]$/.test( siblingText );
911
+ }
912
+ else
913
+ {
914
+ // If this is a visible element.
915
+ // We need to check for the bookmark attribute because IE insists on
916
+ // rendering the display:none nodes we use for bookmarks. (#3363)
917
+ if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_fck_bookmark' ) )
918
+ {
919
+ // We'll accept it only if we need
920
+ // whitespace, and this is an inline
921
+ // element with whitespace only.
922
+ if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] )
923
+ {
924
+ // It must contains spaces and inline elements only.
925
+
926
+ siblingText = sibling.getText();
927
+
928
+ if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF)
929
+ sibling = null;
930
+ else
931
+ {
932
+ var allChildren = sibling.$.all || sibling.$.getElementsByTagName( '*' );
933
+ for ( var i = 0, child ; child = allChildren[ i++ ] ; )
934
+ {
935
+ if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] )
936
+ {
937
+ sibling = null;
938
+ break;
939
+ }
940
+ }
941
+ }
942
+
943
+ if ( sibling )
944
+ isWhiteSpace = !!siblingText.length;
945
+ }
946
+ else
947
+ sibling = null;
948
+ }
949
+ }
950
+
951
+ // A node with whitespaces has been found.
952
+ if ( isWhiteSpace )
953
+ {
954
+ // Enlarge the last enlargeable node, if we
955
+ // were waiting for spaces.
956
+ if ( needsWhiteSpace )
957
+ {
958
+ if ( commonReached )
959
+ startTop = enlargeable;
960
+ else if ( enlargeable )
961
+ this.setStartBefore( enlargeable );
962
+ }
963
+ else
964
+ needsWhiteSpace = true;
965
+ }
966
+
967
+ if ( sibling )
968
+ {
969
+ var next = sibling.getPrevious();
970
+
971
+ if ( !enlargeable && !next )
972
+ {
973
+ // Set the sibling as enlargeable, so it's
974
+ // parent will be get later outside this while.
975
+ enlargeable = sibling;
976
+ sibling = null;
977
+ break;
978
+ }
979
+
980
+ sibling = next;
981
+ }
982
+ else
983
+ {
984
+ // If sibling has been set to null, then we
985
+ // need to stop enlarging.
986
+ enlargeable = null;
987
+ }
988
+ }
989
+
990
+ if ( enlargeable )
991
+ enlargeable = enlargeable.getParent();
992
+ }
993
+
994
+ // Process the end boundary. This is basically the same
995
+ // code used for the start boundary, with small changes to
996
+ // make it work in the oposite side (to the right). This
997
+ // makes it difficult to reuse the code here. So, fixes to
998
+ // the above code are likely to be replicated here.
999
+
1000
+ container = this.endContainer;
1001
+ offset = this.endOffset;
1002
+
1003
+ // Reset the common variables.
1004
+ enlargeable = sibling = null;
1005
+ commonReached = needsWhiteSpace = false;
1006
+
1007
+ if ( container.type == CKEDITOR.NODE_TEXT )
1008
+ {
1009
+ // Check if there is any non-space text after the
1010
+ // offset. Otherwise, container is null.
1011
+ container = !CKEDITOR.tools.trim( container.substring( offset ) ).length && container;
1012
+
1013
+ // If we found only whitespace in the node, it
1014
+ // means that we'll need more whitespace to be able
1015
+ // to expand. For example, <i> can be expanded in
1016
+ // "A <i> [B]</i>", but not in "A<i> [B]</i>".
1017
+ needsWhiteSpace = !( container && container.getLength() );
1018
+
1019
+ if ( container )
1020
+ {
1021
+ if ( !( sibling = container.getNext() ) )
1022
+ enlargeable = container.getParent();
1023
+ }
1024
+ }
1025
+ else
1026
+ {
1027
+ // Get the node right after the boudary to be checked
1028
+ // first.
1029
+ sibling = container.getChild( offset );
1030
+
1031
+ if ( !sibling )
1032
+ enlargeable = container;
1033
+ }
1034
+
1035
+ while ( enlargeable || sibling )
1036
+ {
1037
+ if ( enlargeable && !sibling )
1038
+ {
1039
+ if ( !commonReached && enlargeable.equals( commonAncestor ) )
1040
+ commonReached = true;
1041
+
1042
+ if ( !body.contains( enlargeable ) )
1043
+ break;
1044
+
1045
+ if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' )
1046
+ {
1047
+ needsWhiteSpace = false;
1048
+
1049
+ if ( commonReached )
1050
+ endTop = enlargeable;
1051
+ else if ( enlargeable )
1052
+ this.setEndAfter( enlargeable );
1053
+ }
1054
+
1055
+ sibling = enlargeable.getNext();
1056
+ }
1057
+
1058
+ while ( sibling )
1059
+ {
1060
+ isWhiteSpace = false;
1061
+
1062
+ if ( sibling.type == CKEDITOR.NODE_TEXT )
1063
+ {
1064
+ siblingText = sibling.getText();
1065
+
1066
+ if ( /[^\s\ufeff]/.test( siblingText ) )
1067
+ sibling = null;
1068
+
1069
+ isWhiteSpace = /^[\s\ufeff]/.test( siblingText );
1070
+ }
1071
+ else
1072
+ {
1073
+ // If this is a visible element.
1074
+ // We need to check for the bookmark attribute because IE insists on
1075
+ // rendering the display:none nodes we use for bookmarks. (#3363)
1076
+ if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_fck_bookmark' ) )
1077
+ {
1078
+ // We'll accept it only if we need
1079
+ // whitespace, and this is an inline
1080
+ // element with whitespace only.
1081
+ if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] )
1082
+ {
1083
+ // It must contains spaces and inline elements only.
1084
+
1085
+ siblingText = sibling.getText();
1086
+
1087
+ if ( (/[^\s\ufeff]/).test( siblingText ) )
1088
+ sibling = null;
1089
+ else
1090
+ {
1091
+ allChildren = sibling.$.all || sibling.$.getElementsByTagName( '*' );
1092
+ for ( i = 0 ; child = allChildren[ i++ ] ; )
1093
+ {
1094
+ if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] )
1095
+ {
1096
+ sibling = null;
1097
+ break;
1098
+ }
1099
+ }
1100
+ }
1101
+
1102
+ if ( sibling )
1103
+ isWhiteSpace = !!siblingText.length;
1104
+ }
1105
+ else
1106
+ sibling = null;
1107
+ }
1108
+ }
1109
+
1110
+ if ( isWhiteSpace )
1111
+ {
1112
+ if ( needsWhiteSpace )
1113
+ {
1114
+ if ( commonReached )
1115
+ endTop = enlargeable;
1116
+ else
1117
+ this.setEndAfter( enlargeable );
1118
+ }
1119
+ }
1120
+
1121
+ if ( sibling )
1122
+ {
1123
+ next = sibling.getNext();
1124
+
1125
+ if ( !enlargeable && !next )
1126
+ {
1127
+ enlargeable = sibling;
1128
+ sibling = null;
1129
+ break;
1130
+ }
1131
+
1132
+ sibling = next;
1133
+ }
1134
+ else
1135
+ {
1136
+ // If sibling has been set to null, then we
1137
+ // need to stop enlarging.
1138
+ enlargeable = null;
1139
+ }
1140
+ }
1141
+
1142
+ if ( enlargeable )
1143
+ enlargeable = enlargeable.getParent();
1144
+ }
1145
+
1146
+ // If the common ancestor can be enlarged by both boundaries, then include it also.
1147
+ if ( startTop && endTop )
1148
+ {
1149
+ commonAncestor = startTop.contains( endTop ) ? endTop : startTop;
1150
+
1151
+ this.setStartBefore( commonAncestor );
1152
+ this.setEndAfter( commonAncestor );
1153
+ }
1154
+ break;
1155
+
1156
+ case CKEDITOR.ENLARGE_BLOCK_CONTENTS:
1157
+ case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:
1158
+
1159
+ // Enlarging the start boundary.
1160
+ var walkerRange = new CKEDITOR.dom.range( this.document );
1161
+
1162
+ body = this.document.getBody();
1163
+
1164
+ walkerRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START );
1165
+ walkerRange.setEnd( this.startContainer, this.startOffset );
1166
+
1167
+ var walker = new CKEDITOR.dom.walker( walkerRange ),
1168
+ blockBoundary, // The node on which the enlarging should stop.
1169
+ tailBr, // In case BR as block boundary.
1170
+ notBlockBoundary = CKEDITOR.dom.walker.blockBoundary(
1171
+ ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ),
1172
+ // Record the encountered 'blockBoundary' for later use.
1173
+ boundaryGuard = function( node )
1174
+ {
1175
+ var retval = notBlockBoundary( node );
1176
+ if ( !retval )
1177
+ blockBoundary = node;
1178
+ return retval;
1179
+ },
1180
+ // Record the encounted 'tailBr' for later use.
1181
+ tailBrGuard = function( node )
1182
+ {
1183
+ var retval = boundaryGuard( node );
1184
+ if ( !retval && node.is && node.is( 'br' ) )
1185
+ tailBr = node;
1186
+ return retval;
1187
+ };
1188
+
1189
+ walker.guard = boundaryGuard;
1190
+
1191
+ enlargeable = walker.lastBackward();
1192
+
1193
+ // It's the body which stop the enlarging if no block boundary found.
1194
+ blockBoundary = blockBoundary || body;
1195
+
1196
+ // Start the range either after the end of found block (<p>...</p>[text)
1197
+ // or at the start of block (<p>[text...), by comparing the document position
1198
+ // with 'enlargeable' node.
1199
+ this.setStartAt(
1200
+ blockBoundary,
1201
+ !blockBoundary.is( 'br' ) &&
1202
+ ( !enlargeable && this.checkStartOfBlock()
1203
+ || enlargeable && blockBoundary.contains( enlargeable ) ) ?
1204
+ CKEDITOR.POSITION_AFTER_START :
1205
+ CKEDITOR.POSITION_AFTER_END );
1206
+
1207
+ // Enlarging the end boundary.
1208
+ walkerRange = this.clone();
1209
+ walkerRange.collapse();
1210
+ walkerRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END );
1211
+ walker = new CKEDITOR.dom.walker( walkerRange );
1212
+
1213
+ // tailBrGuard only used for on range end.
1214
+ walker.guard = ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ?
1215
+ tailBrGuard : boundaryGuard;
1216
+ blockBoundary = null;
1217
+ // End the range right before the block boundary node.
1218
+
1219
+ enlargeable = walker.lastForward();
1220
+
1221
+ // It's the body which stop the enlarging if no block boundary found.
1222
+ blockBoundary = blockBoundary || body;
1223
+
1224
+ // Close the range either before the found block start (text]<p>...</p>) or at the block end (...text]</p>)
1225
+ // by comparing the document position with 'enlargeable' node.
1226
+ this.setEndAt(
1227
+ blockBoundary,
1228
+ ( !enlargeable && this.checkEndOfBlock()
1229
+ || enlargeable && blockBoundary.contains( enlargeable ) ) ?
1230
+ CKEDITOR.POSITION_BEFORE_END :
1231
+ CKEDITOR.POSITION_BEFORE_START );
1232
+ // We must include the <br> at the end of range if there's
1233
+ // one and we're expanding list item contents
1234
+ if ( tailBr )
1235
+ this.setEndAfter( tailBr );
1236
+ }
1237
+ },
1238
+
1239
+ /**
1240
+ * Descrease the range to make sure that boundaries
1241
+ * always anchor beside text nodes or innermost element.
1242
+ * @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode.
1243
+ * <dl>
1244
+ * <dt>CKEDITOR.SHRINK_ELEMENT</dt>
1245
+ * <dd>Shrink the range boundaries to the edge of the innermost element.</dd>
1246
+ * <dt>CKEDITOR.SHRINK_TEXT</dt>
1247
+ * <dd>Shrink the range boudaries to anchor by the side of enclosed text node, range remains if there's no text nodes on boundaries at all.</dd>
1248
+ * </dl>
1249
+ * @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node.
1250
+ */
1251
+ shrink : function( mode, selectContents )
1252
+ {
1253
+ // Unable to shrink a collapsed range.
1254
+ if ( !this.collapsed )
1255
+ {
1256
+ mode = mode || CKEDITOR.SHRINK_TEXT;
1257
+
1258
+ var walkerRange = this.clone();
1259
+
1260
+ var startContainer = this.startContainer,
1261
+ endContainer = this.endContainer,
1262
+ startOffset = this.startOffset,
1263
+ endOffset = this.endOffset,
1264
+ collapsed = this.collapsed;
1265
+
1266
+ // Whether the start/end boundary is moveable.
1267
+ var moveStart = 1,
1268
+ moveEnd = 1;
1269
+
1270
+ if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
1271
+ {
1272
+ if ( !startOffset )
1273
+ walkerRange.setStartBefore( startContainer );
1274
+ else if ( startOffset >= startContainer.getLength( ) )
1275
+ walkerRange.setStartAfter( startContainer );
1276
+ else
1277
+ {
1278
+ // Enlarge the range properly to avoid walker making
1279
+ // DOM changes caused by triming the text nodes later.
1280
+ walkerRange.setStartBefore( startContainer );
1281
+ moveStart = 0;
1282
+ }
1283
+ }
1284
+
1285
+ if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
1286
+ {
1287
+ if ( !endOffset )
1288
+ walkerRange.setEndBefore( endContainer );
1289
+ else if ( endOffset >= endContainer.getLength( ) )
1290
+ walkerRange.setEndAfter( endContainer );
1291
+ else
1292
+ {
1293
+ walkerRange.setEndAfter( endContainer );
1294
+ moveEnd = 0;
1295
+ }
1296
+ }
1297
+
1298
+ var walker = new CKEDITOR.dom.walker( walkerRange );
1299
+
1300
+ walker.evaluator = function( node )
1301
+ {
1302
+ return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ?
1303
+ CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT );
1304
+ };
1305
+
1306
+ var currentElement;
1307
+ walker.guard = function( node, movingOut )
1308
+ {
1309
+ // Stop when we're shrink in element mode while encountering a text node.
1310
+ if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT )
1311
+ return false;
1312
+
1313
+ // Stop when we've already walked "through" an element.
1314
+ if ( movingOut && node.equals( currentElement ) )
1315
+ return false;
1316
+
1317
+ if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT )
1318
+ currentElement = node;
1319
+
1320
+ return true;
1321
+ };
1322
+
1323
+ if ( moveStart )
1324
+ {
1325
+ var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next']();
1326
+ textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START );
1327
+ }
1328
+
1329
+ if ( moveEnd )
1330
+ {
1331
+ walker.reset();
1332
+ var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous']();
1333
+ textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END );
1334
+ }
1335
+
1336
+ return !!( moveStart || moveEnd );
1337
+ }
1338
+ },
1339
+
1340
+ /**
1341
+ * Inserts a node at the start of the range. The range will be expanded
1342
+ * the contain the node.
1343
+ */
1344
+ insertNode : function( node )
1345
+ {
1346
+ this.optimizeBookmark();
1347
+ this.trim( false, true );
1348
+
1349
+ var startContainer = this.startContainer;
1350
+ var startOffset = this.startOffset;
1351
+
1352
+ var nextNode = startContainer.getChild( startOffset );
1353
+
1354
+ if ( nextNode )
1355
+ node.insertBefore( nextNode );
1356
+ else
1357
+ startContainer.append( node );
1358
+
1359
+ // Check if we need to update the end boundary.
1360
+ if ( node.getParent().equals( this.endContainer ) )
1361
+ this.endOffset++;
1362
+
1363
+ // Expand the range to embrace the new node.
1364
+ this.setStartBefore( node );
1365
+ },
1366
+
1367
+ moveToPosition : function( node, position )
1368
+ {
1369
+ this.setStartAt( node, position );
1370
+ this.collapse( true );
1371
+ },
1372
+
1373
+ selectNodeContents : function( node )
1374
+ {
1375
+ this.setStart( node, 0 );
1376
+ this.setEnd( node, node.type == CKEDITOR.NODE_TEXT ? node.getLength() : node.getChildCount() );
1377
+ },
1378
+
1379
+ /**
1380
+ * Sets the start position of a Range.
1381
+ * @param {CKEDITOR.dom.node} startNode The node to start the range.
1382
+ * @param {Number} startOffset An integer greater than or equal to zero
1383
+ * representing the offset for the start of the range from the start
1384
+ * of startNode.
1385
+ */
1386
+ setStart : function( startNode, startOffset )
1387
+ {
1388
+ // W3C requires a check for the new position. If it is after the end
1389
+ // boundary, the range should be collapsed to the new start. It seams
1390
+ // we will not need this check for our use of this class so we can
1391
+ // ignore it for now.
1392
+
1393
+ // Fixing invalid range start inside dtd empty elements.
1394
+ if( startNode.type == CKEDITOR.NODE_ELEMENT
1395
+ && CKEDITOR.dtd.$empty[ startNode.getName() ] )
1396
+ startNode = startNode.getParent(), startOffset = startNode.getIndex();
1397
+
1398
+ this.startContainer = startNode;
1399
+ this.startOffset = startOffset;
1400
+
1401
+ if ( !this.endContainer )
1402
+ {
1403
+ this.endContainer = startNode;
1404
+ this.endOffset = startOffset;
1405
+ }
1406
+
1407
+ updateCollapsed( this );
1408
+ },
1409
+
1410
+ /**
1411
+ * Sets the end position of a Range.
1412
+ * @param {CKEDITOR.dom.node} endNode The node to end the range.
1413
+ * @param {Number} endOffset An integer greater than or equal to zero
1414
+ * representing the offset for the end of the range from the start
1415
+ * of endNode.
1416
+ */
1417
+ setEnd : function( endNode, endOffset )
1418
+ {
1419
+ // W3C requires a check for the new position. If it is before the start
1420
+ // boundary, the range should be collapsed to the new end. It seams we
1421
+ // will not need this check for our use of this class so we can ignore
1422
+ // it for now.
1423
+
1424
+ // Fixing invalid range end inside dtd empty elements.
1425
+ if( endNode.type == CKEDITOR.NODE_ELEMENT
1426
+ && CKEDITOR.dtd.$empty[ endNode.getName() ] )
1427
+ endNode = endNode.getParent(), endOffset = endNode.getIndex() + 1;
1428
+
1429
+ this.endContainer = endNode;
1430
+ this.endOffset = endOffset;
1431
+
1432
+ if ( !this.startContainer )
1433
+ {
1434
+ this.startContainer = endNode;
1435
+ this.startOffset = endOffset;
1436
+ }
1437
+
1438
+ updateCollapsed( this );
1439
+ },
1440
+
1441
+ setStartAfter : function( node )
1442
+ {
1443
+ this.setStart( node.getParent(), node.getIndex() + 1 );
1444
+ },
1445
+
1446
+ setStartBefore : function( node )
1447
+ {
1448
+ this.setStart( node.getParent(), node.getIndex() );
1449
+ },
1450
+
1451
+ setEndAfter : function( node )
1452
+ {
1453
+ this.setEnd( node.getParent(), node.getIndex() + 1 );
1454
+ },
1455
+
1456
+ setEndBefore : function( node )
1457
+ {
1458
+ this.setEnd( node.getParent(), node.getIndex() );
1459
+ },
1460
+
1461
+ setStartAt : function( node, position )
1462
+ {
1463
+ switch( position )
1464
+ {
1465
+ case CKEDITOR.POSITION_AFTER_START :
1466
+ this.setStart( node, 0 );
1467
+ break;
1468
+
1469
+ case CKEDITOR.POSITION_BEFORE_END :
1470
+ if ( node.type == CKEDITOR.NODE_TEXT )
1471
+ this.setStart( node, node.getLength() );
1472
+ else
1473
+ this.setStart( node, node.getChildCount() );
1474
+ break;
1475
+
1476
+ case CKEDITOR.POSITION_BEFORE_START :
1477
+ this.setStartBefore( node );
1478
+ break;
1479
+
1480
+ case CKEDITOR.POSITION_AFTER_END :
1481
+ this.setStartAfter( node );
1482
+ }
1483
+
1484
+ updateCollapsed( this );
1485
+ },
1486
+
1487
+ setEndAt : function( node, position )
1488
+ {
1489
+ switch( position )
1490
+ {
1491
+ case CKEDITOR.POSITION_AFTER_START :
1492
+ this.setEnd( node, 0 );
1493
+ break;
1494
+
1495
+ case CKEDITOR.POSITION_BEFORE_END :
1496
+ if ( node.type == CKEDITOR.NODE_TEXT )
1497
+ this.setEnd( node, node.getLength() );
1498
+ else
1499
+ this.setEnd( node, node.getChildCount() );
1500
+ break;
1501
+
1502
+ case CKEDITOR.POSITION_BEFORE_START :
1503
+ this.setEndBefore( node );
1504
+ break;
1505
+
1506
+ case CKEDITOR.POSITION_AFTER_END :
1507
+ this.setEndAfter( node );
1508
+ }
1509
+
1510
+ updateCollapsed( this );
1511
+ },
1512
+
1513
+ fixBlock : function( isStart, blockTag )
1514
+ {
1515
+ var bookmark = this.createBookmark(),
1516
+ fixedBlock = this.document.createElement( blockTag );
1517
+
1518
+ this.collapse( isStart );
1519
+
1520
+ this.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS );
1521
+
1522
+ this.extractContents().appendTo( fixedBlock );
1523
+ fixedBlock.trim();
1524
+
1525
+ if ( !CKEDITOR.env.ie )
1526
+ fixedBlock.appendBogus();
1527
+
1528
+ this.insertNode( fixedBlock );
1529
+
1530
+ this.moveToBookmark( bookmark );
1531
+
1532
+ return fixedBlock;
1533
+ },
1534
+
1535
+ splitBlock : function( blockTag )
1536
+ {
1537
+ var startPath = new CKEDITOR.dom.elementPath( this.startContainer ),
1538
+ endPath = new CKEDITOR.dom.elementPath( this.endContainer );
1539
+
1540
+ var startBlockLimit = startPath.blockLimit,
1541
+ endBlockLimit = endPath.blockLimit;
1542
+
1543
+ var startBlock = startPath.block,
1544
+ endBlock = endPath.block;
1545
+
1546
+ var elementPath = null;
1547
+ // Do nothing if the boundaries are in different block limits.
1548
+ if ( !startBlockLimit.equals( endBlockLimit ) )
1549
+ return null;
1550
+
1551
+ // Get or fix current blocks.
1552
+ if ( blockTag != 'br' )
1553
+ {
1554
+ if ( !startBlock )
1555
+ {
1556
+ startBlock = this.fixBlock( true, blockTag );
1557
+ endBlock = new CKEDITOR.dom.elementPath( this.endContainer ).block;
1558
+ }
1559
+
1560
+ if ( !endBlock )
1561
+ endBlock = this.fixBlock( false, blockTag );
1562
+ }
1563
+
1564
+ // Get the range position.
1565
+ var isStartOfBlock = startBlock && this.checkStartOfBlock(),
1566
+ isEndOfBlock = endBlock && this.checkEndOfBlock();
1567
+
1568
+ // Delete the current contents.
1569
+ // TODO: Why is 2.x doing CheckIsEmpty()?
1570
+ this.deleteContents();
1571
+
1572
+ if ( startBlock && startBlock.equals( endBlock ) )
1573
+ {
1574
+ if ( isEndOfBlock )
1575
+ {
1576
+ elementPath = new CKEDITOR.dom.elementPath( this.startContainer );
1577
+ this.moveToPosition( endBlock, CKEDITOR.POSITION_AFTER_END );
1578
+ endBlock = null;
1579
+ }
1580
+ else if ( isStartOfBlock )
1581
+ {
1582
+ elementPath = new CKEDITOR.dom.elementPath( this.startContainer );
1583
+ this.moveToPosition( startBlock, CKEDITOR.POSITION_BEFORE_START );
1584
+ startBlock = null;
1585
+ }
1586
+ else
1587
+ {
1588
+ endBlock = this.splitElement( startBlock );
1589
+
1590
+ // In Gecko, the last child node must be a bogus <br>.
1591
+ // Note: bogus <br> added under <ul> or <ol> would cause
1592
+ // lists to be incorrectly rendered.
1593
+ if ( !CKEDITOR.env.ie && !startBlock.is( 'ul', 'ol') )
1594
+ startBlock.appendBogus() ;
1595
+ }
1596
+ }
1597
+
1598
+ return {
1599
+ previousBlock : startBlock,
1600
+ nextBlock : endBlock,
1601
+ wasStartOfBlock : isStartOfBlock,
1602
+ wasEndOfBlock : isEndOfBlock,
1603
+ elementPath : elementPath
1604
+ };
1605
+ },
1606
+
1607
+ /**
1608
+ * Branch the specified element from the collapsed range position and
1609
+ * place the caret between the two result branches.
1610
+ * Note: The range must be collapsed and been enclosed by this element.
1611
+ * @param {CKEDITOR.dom.element} element
1612
+ * @return {CKEDITOR.dom.element} Root element of the new branch after the split.
1613
+ */
1614
+ splitElement : function( toSplit )
1615
+ {
1616
+ if ( !this.collapsed )
1617
+ return null;
1618
+
1619
+ // Extract the contents of the block from the selection point to the end
1620
+ // of its contents.
1621
+ this.setEndAt( toSplit, CKEDITOR.POSITION_BEFORE_END );
1622
+ var documentFragment = this.extractContents();
1623
+
1624
+ // Duplicate the element after it.
1625
+ var clone = toSplit.clone( false );
1626
+
1627
+ // Place the extracted contents into the duplicated element.
1628
+ documentFragment.appendTo( clone );
1629
+ clone.insertAfter( toSplit );
1630
+ this.moveToPosition( toSplit, CKEDITOR.POSITION_AFTER_END );
1631
+ return clone;
1632
+ },
1633
+
1634
+ /**
1635
+ * Check whether current range is on the inner edge of the specified element.
1636
+ * @param {Number} checkType ( CKEDITOR.START | CKEDITOR.END ) The checking side.
1637
+ * @param {CKEDITOR.dom.element} element The target element to check.
1638
+ */
1639
+ checkBoundaryOfElement : function( element, checkType )
1640
+ {
1641
+ var walkerRange = this.clone();
1642
+ // Expand the range to element boundary.
1643
+ walkerRange[ checkType == CKEDITOR.START ?
1644
+ 'setStartAt' : 'setEndAt' ]
1645
+ ( element, checkType == CKEDITOR.START ?
1646
+ CKEDITOR.POSITION_AFTER_START
1647
+ : CKEDITOR.POSITION_BEFORE_END );
1648
+
1649
+ var walker = new CKEDITOR.dom.walker( walkerRange );
1650
+ walker.evaluator = elementBoundaryEval;
1651
+ return walker[ checkType == CKEDITOR.START ?
1652
+ 'checkBackward' : 'checkForward' ]();
1653
+ },
1654
+
1655
+ // Calls to this function may produce changes to the DOM. The range may
1656
+ // be updated to reflect such changes.
1657
+ checkStartOfBlock : function()
1658
+ {
1659
+ var startContainer = this.startContainer,
1660
+ startOffset = this.startOffset;
1661
+
1662
+ // If the starting node is a text node, and non-empty before the offset,
1663
+ // then we're surely not at the start of block.
1664
+ if ( startOffset && startContainer.type == CKEDITOR.NODE_TEXT )
1665
+ {
1666
+ var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) );
1667
+ if ( textBefore.length )
1668
+ return false;
1669
+ }
1670
+
1671
+ // Antecipate the trim() call here, so the walker will not make
1672
+ // changes to the DOM, which would not get reflected into this
1673
+ // range otherwise.
1674
+ this.trim();
1675
+
1676
+ // We need to grab the block element holding the start boundary, so
1677
+ // let's use an element path for it.
1678
+ var path = new CKEDITOR.dom.elementPath( this.startContainer );
1679
+
1680
+ // Creates a range starting at the block start until the range start.
1681
+ var walkerRange = this.clone();
1682
+ walkerRange.collapse( true );
1683
+ walkerRange.setStartAt( path.block || path.blockLimit, CKEDITOR.POSITION_AFTER_START );
1684
+
1685
+ var walker = new CKEDITOR.dom.walker( walkerRange );
1686
+ walker.evaluator = getCheckStartEndBlockEvalFunction( true );
1687
+
1688
+ return walker.checkBackward();
1689
+ },
1690
+
1691
+ checkEndOfBlock : function()
1692
+ {
1693
+ var endContainer = this.endContainer,
1694
+ endOffset = this.endOffset;
1695
+
1696
+ // If the ending node is a text node, and non-empty after the offset,
1697
+ // then we're surely not at the end of block.
1698
+ if ( endContainer.type == CKEDITOR.NODE_TEXT )
1699
+ {
1700
+ var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) );
1701
+ if ( textAfter.length )
1702
+ return false;
1703
+ }
1704
+
1705
+ // Antecipate the trim() call here, so the walker will not make
1706
+ // changes to the DOM, which would not get reflected into this
1707
+ // range otherwise.
1708
+ this.trim();
1709
+
1710
+ // We need to grab the block element holding the start boundary, so
1711
+ // let's use an element path for it.
1712
+ var path = new CKEDITOR.dom.elementPath( this.endContainer );
1713
+
1714
+ // Creates a range starting at the block start until the range start.
1715
+ var walkerRange = this.clone();
1716
+ walkerRange.collapse( false );
1717
+ walkerRange.setEndAt( path.block || path.blockLimit, CKEDITOR.POSITION_BEFORE_END );
1718
+
1719
+ var walker = new CKEDITOR.dom.walker( walkerRange );
1720
+ walker.evaluator = getCheckStartEndBlockEvalFunction( false );
1721
+
1722
+ return walker.checkForward();
1723
+ },
1724
+
1725
+ /**
1726
+ * Moves the range boundaries to the first/end editing point inside an
1727
+ * element. For example, in an element tree like
1728
+ * "&lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt; Text&lt;/p&gt;", the start editing point is
1729
+ * "&lt;p&gt;&lt;b&gt;&lt;i&gt;^&lt;/i&gt;&lt;/b&gt; Text&lt;/p&gt;" (inside &lt;i&gt;).
1730
+ * @param {CKEDITOR.dom.element} el The element into which look for the
1731
+ * editing spot.
1732
+ * @param {Boolean} isMoveToEnd Whether move to the end editable position.
1733
+ */
1734
+ moveToElementEditablePosition : function( el, isMoveToEnd )
1735
+ {
1736
+ var isEditable;
1737
+
1738
+ // Empty elements are rejected.
1739
+ if ( CKEDITOR.dtd.$empty[ el.getName() ] )
1740
+ return false;
1741
+
1742
+ while ( el && el.type == CKEDITOR.NODE_ELEMENT )
1743
+ {
1744
+ isEditable = el.isEditable();
1745
+
1746
+ // If an editable element is found, move inside it.
1747
+ if ( isEditable )
1748
+ this.moveToPosition( el, isMoveToEnd ?
1749
+ CKEDITOR.POSITION_BEFORE_END :
1750
+ CKEDITOR.POSITION_AFTER_START );
1751
+ // Stop immediately if we've found a non editable inline element (e.g <img>).
1752
+ else if ( CKEDITOR.dtd.$inline[ el.getName() ] )
1753
+ {
1754
+ this.moveToPosition( el, isMoveToEnd ?
1755
+ CKEDITOR.POSITION_AFTER_END :
1756
+ CKEDITOR.POSITION_BEFORE_START );
1757
+ return true;
1758
+ }
1759
+
1760
+ // Non-editable non-inline elements are to be bypassed, getting the next one.
1761
+ if ( CKEDITOR.dtd.$empty[ el.getName() ] )
1762
+ el = el[ isMoveToEnd ? 'getPrevious' : 'getNext' ]( nonWhitespaceOrBookmarkEval );
1763
+ else
1764
+ el = el[ isMoveToEnd ? 'getLast' : 'getFirst' ]( nonWhitespaceOrBookmarkEval );
1765
+
1766
+ // Stop immediately if we've found a text node.
1767
+ if ( el && el.type == CKEDITOR.NODE_TEXT )
1768
+ {
1769
+ this.moveToPosition( el, isMoveToEnd ?
1770
+ CKEDITOR.POSITION_AFTER_END :
1771
+ CKEDITOR.POSITION_BEFORE_START );
1772
+ return true;
1773
+ }
1774
+ }
1775
+
1776
+ return isEditable;
1777
+ },
1778
+
1779
+ /**
1780
+ *@see {CKEDITOR.dom.range.moveToElementEditablePosition}
1781
+ */
1782
+ moveToElementEditStart : function( target )
1783
+ {
1784
+ return this.moveToElementEditablePosition( target );
1785
+ },
1786
+
1787
+ /**
1788
+ *@see {CKEDITOR.dom.range.moveToElementEditablePosition}
1789
+ */
1790
+ moveToElementEditEnd : function( target )
1791
+ {
1792
+ return this.moveToElementEditablePosition( target, true );
1793
+ },
1794
+
1795
+ /**
1796
+ * Get the single node enclosed within the range if there's one.
1797
+ */
1798
+ getEnclosedNode : function()
1799
+ {
1800
+ var walkerRange = this.clone();
1801
+
1802
+ // Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780)
1803
+ walkerRange.optimize();
1804
+ if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT
1805
+ || walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT )
1806
+ return null;
1807
+
1808
+ var walker = new CKEDITOR.dom.walker( walkerRange ),
1809
+ isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ),
1810
+ isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
1811
+ evaluator = function( node )
1812
+ {
1813
+ return isNotWhitespaces( node ) && isNotBookmarks( node );
1814
+ };
1815
+ walkerRange.evaluator = evaluator;
1816
+ var node = walker.next();
1817
+ walker.reset();
1818
+ return node && node.equals( walker.previous() ) ? node : null;
1819
+ },
1820
+
1821
+ getTouchedStartNode : function()
1822
+ {
1823
+ var container = this.startContainer ;
1824
+
1825
+ if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT )
1826
+ return container ;
1827
+
1828
+ return container.getChild( this.startOffset ) || container ;
1829
+ },
1830
+
1831
+ getTouchedEndNode : function()
1832
+ {
1833
+ var container = this.endContainer ;
1834
+
1835
+ if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT )
1836
+ return container ;
1837
+
1838
+ return container.getChild( this.endOffset - 1 ) || container ;
1839
+ }
1840
+ };
1841
+ })();
1842
+
1843
+ CKEDITOR.POSITION_AFTER_START = 1; // <element>^contents</element> "^text"
1844
+ CKEDITOR.POSITION_BEFORE_END = 2; // <element>contents^</element> "text^"
1845
+ CKEDITOR.POSITION_BEFORE_START = 3; // ^<element>contents</element> ^"text"
1846
+ CKEDITOR.POSITION_AFTER_END = 4; // <element>contents</element>^ "text"
1847
+
1848
+ CKEDITOR.ENLARGE_ELEMENT = 1;
1849
+ CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2;
1850
+ CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3;
1851
+
1852
+ /**
1853
+ * Check boundary types.
1854
+ * @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement
1855
+ */
1856
+ CKEDITOR.START = 1;
1857
+ CKEDITOR.END = 2;
1858
+ CKEDITOR.STARTEND = 3;
1859
+
1860
+ /**
1861
+ * Shrink range types.
1862
+ * @see CKEDITOR.dom.range.prototype.shrink
1863
+ */
1864
+ CKEDITOR.SHRINK_ELEMENT = 1;
1865
+ CKEDITOR.SHRINK_TEXT = 2;