ckeditor 3.5.0 → 3.5.1

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