radiant-ck_editor_filter-extension 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (577) hide show
  1. data/LICENSE +21 -0
  2. data/README.markdown +55 -0
  3. data/Rakefile +138 -0
  4. data/VERSION +1 -0
  5. data/app/models/ckeditor_interface.rb +15 -0
  6. data/app/views/admin/assets/_asset.html.haml +19 -0
  7. data/app/views/admin/pages/_editor_control.html.haml +1 -0
  8. data/ck_editor_filter_extension.rb +25 -0
  9. data/ckeditor.html +0 -0
  10. data/cucumber.yml +1 -0
  11. data/features/support/env.rb +16 -0
  12. data/features/support/paths.rb +14 -0
  13. data/lib/ck_editor_filter.rb +7 -0
  14. data/lib/tasks/ck_editor_filter_extension_tasks.rake +28 -0
  15. data/public/images/admin/tmp_thumbnail_icon.png +0 -0
  16. data/public/javascripts/extensions/ck_editor_filter/ckeditor/.htaccess +24 -0
  17. data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.html +538 -0
  18. data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +92 -0
  19. data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.html +1334 -0
  20. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ajax.html +100 -0
  21. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api.html +152 -0
  22. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog.html +181 -0
  23. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog/my_dialog.js +28 -0
  24. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/divreplace.html +137 -0
  25. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/enterkey.html +88 -0
  26. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/fullpage.html +62 -0
  27. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/index.html +53 -0
  28. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/jqueryadapter.html +73 -0
  29. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/advanced.php +93 -0
  30. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/events.php +130 -0
  31. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replace.php +63 -0
  32. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replaceall.php +68 -0
  33. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/standalone.php +64 -0
  34. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebyclass.html +49 -0
  35. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebycode.html +80 -0
  36. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.css +81 -0
  37. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.js +65 -0
  38. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample_posteddata.php +59 -0
  39. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sharedspaces.html +131 -0
  40. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/skins.html +83 -0
  41. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_color.html +87 -0
  42. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_languages.html +104 -0
  43. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/adapters/jquery.js +297 -0
  44. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/_bootstrap.js +84 -0
  45. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ajax.js +143 -0
  46. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor.js +103 -0
  47. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_base.js +190 -0
  48. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_basic.js +241 -0
  49. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/command.js +73 -0
  50. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/commanddefinition.js +86 -0
  51. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/config.js +307 -0
  52. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dataprocessor.js +66 -0
  53. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom.js +21 -0
  54. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/comment.js +32 -0
  55. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/document.js +224 -0
  56. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/documentfragment.js +49 -0
  57. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/domobject.js +210 -0
  58. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/element.js +1441 -0
  59. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js +104 -0
  60. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/event.js +142 -0
  61. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/node.js +662 -0
  62. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/nodelist.js +23 -0
  63. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/range.js +1735 -0
  64. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/text.js +123 -0
  65. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/walker.js +451 -0
  66. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/window.js +96 -0
  67. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dtd.js +233 -0
  68. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor.js +720 -0
  69. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor_basic.js +179 -0
  70. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/env.js +219 -0
  71. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/event.js +336 -0
  72. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/eventInfo.js +120 -0
  73. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/focusmanager.js +137 -0
  74. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser.js +212 -0
  75. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
  76. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/cdata.js +43 -0
  77. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/comment.js +60 -0
  78. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/element.js +240 -0
  79. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/filter.js +262 -0
  80. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/fragment.js +495 -0
  81. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/text.js +55 -0
  82. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/imagecacher.js +58 -0
  83. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/lang.js +152 -0
  84. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/loader.js +242 -0
  85. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugindefinition.js +66 -0
  86. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugins.js +85 -0
  87. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/resourcemanager.js +238 -0
  88. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/scriptloader.js +198 -0
  89. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/skins.js +204 -0
  90. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/themes.js +19 -0
  91. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/tools.js +685 -0
  92. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ui.js +116 -0
  93. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/xml.js +165 -0
  94. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_languages.js +83 -0
  95. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_translationstatus.txt +60 -0
  96. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/af.js +699 -0
  97. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ar.js +699 -0
  98. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bg.js +699 -0
  99. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bn.js +699 -0
  100. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bs.js +699 -0
  101. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ca.js +699 -0
  102. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cs.js +699 -0
  103. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cy.js +699 -0
  104. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/da.js +699 -0
  105. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/de.js +699 -0
  106. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/el.js +699 -0
  107. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-au.js +699 -0
  108. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-ca.js +699 -0
  109. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-gb.js +699 -0
  110. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en.js +699 -0
  111. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eo.js +699 -0
  112. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/es.js +699 -0
  113. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/et.js +699 -0
  114. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eu.js +699 -0
  115. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fa.js +699 -0
  116. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fi.js +699 -0
  117. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fo.js +699 -0
  118. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr-ca.js +699 -0
  119. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr.js +699 -0
  120. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gl.js +699 -0
  121. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gu.js +699 -0
  122. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/he.js +699 -0
  123. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hi.js +699 -0
  124. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hr.js +699 -0
  125. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hu.js +699 -0
  126. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/is.js +699 -0
  127. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/it.js +699 -0
  128. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ja.js +699 -0
  129. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/km.js +699 -0
  130. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ko.js +699 -0
  131. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lt.js +699 -0
  132. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lv.js +699 -0
  133. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/mn.js +699 -0
  134. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ms.js +699 -0
  135. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nb.js +699 -0
  136. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nl.js +699 -0
  137. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/no.js +699 -0
  138. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pl.js +699 -0
  139. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt-br.js +699 -0
  140. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt.js +699 -0
  141. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ro.js +699 -0
  142. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ru.js +699 -0
  143. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sk.js +699 -0
  144. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sl.js +699 -0
  145. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr-latn.js +699 -0
  146. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr.js +699 -0
  147. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sv.js +699 -0
  148. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/th.js +699 -0
  149. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/tr.js +699 -0
  150. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/uk.js +699 -0
  151. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/vi.js +699 -0
  152. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh-cn.js +699 -0
  153. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh.js +699 -0
  154. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +211 -0
  155. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
  156. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/plugin.js +46 -0
  157. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/about.js +73 -0
  158. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  159. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/plugin.js +23 -0
  160. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/basicstyles/plugin.js +93 -0
  161. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/blockquote/plugin.js +301 -0
  162. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/button/plugin.js +270 -0
  163. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/dialogs/paste.js +186 -0
  164. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/plugin.js +382 -0
  165. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colorbutton/plugin.js +227 -0
  166. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +191 -0
  167. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/plugin.js +13 -0
  168. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/contextmenu/plugin.js +274 -0
  169. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/dialogDefinition.js +315 -0
  170. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/plugin.js +2884 -0
  171. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogui/plugin.js +1408 -0
  172. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/dialogs/div.js +535 -0
  173. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/plugin.js +121 -0
  174. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/domiterator/plugin.js +355 -0
  175. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/editingblock/plugin.js +224 -0
  176. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/elementspath/plugin.js +189 -0
  177. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/enterkey/plugin.js +329 -0
  178. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/entities/plugin.js +200 -0
  179. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/fakeobjects/plugin.js +120 -0
  180. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/filebrowser/plugin.js +479 -0
  181. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/dialogs/find.js +853 -0
  182. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/plugin.js +46 -0
  183. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/dialogs/flash.js +690 -0
  184. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  185. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/plugin.js +165 -0
  186. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/floatpanel/plugin.js +376 -0
  187. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/font/plugin.js +233 -0
  188. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/format/plugin.js +193 -0
  189. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/button.js +135 -0
  190. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/checkbox.js +143 -0
  191. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/form.js +177 -0
  192. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +91 -0
  193. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/radio.js +135 -0
  194. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/select.js +556 -0
  195. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textarea.js +114 -0
  196. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textfield.js +193 -0
  197. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/plugin.js +217 -0
  198. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/horizontalrule/plugin.js +36 -0
  199. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmldataprocessor/plugin.js +458 -0
  200. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmlwriter/plugin.js +314 -0
  201. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframedialog/plugin.js +136 -0
  202. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/dialogs/image.js +1378 -0
  203. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/plugin.js +64 -0
  204. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/indent/plugin.js +349 -0
  205. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/justify/plugin.js +168 -0
  206. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/keystrokes/plugin.js +229 -0
  207. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/anchor.js +99 -0
  208. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/link.js +1421 -0
  209. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  210. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/plugin.js +188 -0
  211. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/list/plugin.js +643 -0
  212. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/listblock/plugin.js +252 -0
  213. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/maximize/plugin.js +283 -0
  214. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menu/plugin.js +406 -0
  215. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menubutton/plugin.js +93 -0
  216. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/newpage/plugin.js +54 -0
  217. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  218. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/plugin.js +98 -0
  219. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panel/plugin.js +379 -0
  220. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panelbutton/plugin.js +147 -0
  221. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/filter/default.js +1179 -0
  222. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/plugin.js +120 -0
  223. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +77 -0
  224. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/plugin.js +162 -0
  225. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/popup/plugin.js +62 -0
  226. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/preview/plugin.js +108 -0
  227. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/print/plugin.js +41 -0
  228. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/removeformat/plugin.js +132 -0
  229. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/resize/plugin.js +115 -0
  230. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/richcombo/plugin.js +367 -0
  231. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js +55 -0
  232. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/options.js +533 -0
  233. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +71 -0
  234. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/plugin.js +603 -0
  235. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/selection/plugin.js +1103 -0
  236. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  237. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  238. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  239. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  240. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  241. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  242. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  243. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  244. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  245. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  246. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  247. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/plugin.js +154 -0
  248. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showborders/plugin.js +170 -0
  249. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/dialogs/smiley.js +215 -0
  250. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  251. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  252. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  253. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  254. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  255. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  256. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  257. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  258. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  259. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  260. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  261. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  262. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  263. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  264. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  265. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  266. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  267. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  268. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  269. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  270. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  271. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/plugin.js +85 -0
  272. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/sourcearea/plugin.js +205 -0
  273. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +373 -0
  274. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/plugin.js +29 -0
  275. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/styles/plugin.js +1258 -0
  276. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/plugin.js +282 -0
  277. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/styles/default.js +85 -0
  278. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tab/plugin.js +261 -0
  279. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/dialogs/table.js +589 -0
  280. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js +70 -0
  281. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +523 -0
  282. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/plugin.js +1022 -0
  283. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/dialogs/templates.js +229 -0
  284. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/plugin.js +100 -0
  285. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/default.js +94 -0
  286. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  287. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  288. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  289. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/toolbar/plugin.js +474 -0
  290. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +204 -0
  291. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/en.js +15 -0
  292. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/plugin.js +37 -0
  293. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  294. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  295. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  296. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  297. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  298. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +15 -0
  299. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/yui.js +71 -0
  300. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/undo/plugin.js +519 -0
  301. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +49 -0
  302. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  303. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.css +83 -0
  304. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.js +176 -0
  305. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/plugin.js +33 -0
  306. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wysiwygarea/plugin.js +851 -0
  307. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/dialog.css +822 -0
  308. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/editor.css +25 -0
  309. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/elementspath.css +72 -0
  310. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.css +326 -0
  311. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.png +0 -0
  312. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  313. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  314. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  315. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  316. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  317. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  318. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  319. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  320. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/mainui.css +183 -0
  321. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/menu.css +211 -0
  322. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/panel.css +216 -0
  323. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/presets.css +49 -0
  324. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/reset.css +78 -0
  325. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/richcombo.css +270 -0
  326. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/skin.js +268 -0
  327. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/templates.css +84 -0
  328. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/toolbar.css +421 -0
  329. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/dialog.css +728 -0
  330. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/editor.css +25 -0
  331. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/elementspath.css +73 -0
  332. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.css +324 -0
  333. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.png +0 -0
  334. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  335. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  336. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  337. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  338. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  339. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  340. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  341. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/mainui.css +127 -0
  342. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/menu.css +207 -0
  343. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/panel.css +211 -0
  344. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/presets.css +49 -0
  345. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/reset.css +78 -0
  346. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/richcombo.css +289 -0
  347. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/skin.js +81 -0
  348. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/templates.css +81 -0
  349. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/toolbar.css +475 -0
  350. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/dialog.css +743 -0
  351. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/editor.css +25 -0
  352. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/elementspath.css +73 -0
  353. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.css +324 -0
  354. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.png +0 -0
  355. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  356. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  357. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  358. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  359. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  360. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  361. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  362. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  363. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/mainui.css +142 -0
  364. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/menu.css +210 -0
  365. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/panel.css +211 -0
  366. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/presets.css +50 -0
  367. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/reset.css +78 -0
  368. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/richcombo.css +289 -0
  369. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/skin.js +77 -0
  370. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/templates.css +81 -0
  371. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/toolbar.css +425 -0
  372. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/themes/default/theme.js +334 -0
  373. data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +6 -0
  374. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +121 -0
  375. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.pack +205 -0
  376. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.php +29 -0
  377. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +8 -0
  378. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +20 -0
  379. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php4.php +593 -0
  380. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php5.php +583 -0
  381. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +25 -0
  382. data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +11 -0
  383. data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +35 -0
  384. data/public/javascripts/extensions/ck_editor_filter/ckeditor/images/spacer.gif +0 -0
  385. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +6 -0
  386. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +60 -0
  387. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +6 -0
  388. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +6 -0
  389. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +6 -0
  390. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +6 -0
  391. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +6 -0
  392. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +6 -0
  393. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +6 -0
  394. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +6 -0
  395. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +6 -0
  396. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +6 -0
  397. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +6 -0
  398. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +6 -0
  399. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +6 -0
  400. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +6 -0
  401. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +6 -0
  402. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +6 -0
  403. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +6 -0
  404. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +6 -0
  405. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +6 -0
  406. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +6 -0
  407. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +6 -0
  408. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +6 -0
  409. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +6 -0
  410. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +6 -0
  411. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +6 -0
  412. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +6 -0
  413. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +6 -0
  414. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +6 -0
  415. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +6 -0
  416. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +6 -0
  417. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +6 -0
  418. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +6 -0
  419. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +6 -0
  420. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +6 -0
  421. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +6 -0
  422. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +6 -0
  423. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +6 -0
  424. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +6 -0
  425. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +6 -0
  426. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +6 -0
  427. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +6 -0
  428. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +6 -0
  429. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +6 -0
  430. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +6 -0
  431. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +6 -0
  432. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +6 -0
  433. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +6 -0
  434. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +6 -0
  435. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +6 -0
  436. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +6 -0
  437. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +6 -0
  438. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +6 -0
  439. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +6 -0
  440. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +6 -0
  441. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +6 -0
  442. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +6 -0
  443. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +6 -0
  444. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +6 -0
  445. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/dialogs/mediaembed.html +14 -0
  446. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/images/icon.gif +0 -0
  447. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/MediaEmbed/plugin.js +61 -0
  448. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -0
  449. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
  450. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +6 -0
  451. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  452. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
  453. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +6 -0
  454. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  455. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +7 -0
  456. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +9 -0
  457. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +9 -0
  458. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/images/placeholder.png +0 -0
  459. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +6 -0
  460. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +6 -0
  461. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +6 -0
  462. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
  463. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +6 -0
  464. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +9 -0
  465. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +6 -0
  466. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +6 -0
  467. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +6 -0
  468. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +13 -0
  469. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +6 -0
  470. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +11 -0
  471. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/images/anchor.gif +0 -0
  472. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  473. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/images/icon.png +0 -0
  474. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/paperclipped/plugin.js +21 -0
  475. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +10 -0
  476. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
  477. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +8 -0
  478. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +6 -0
  479. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  480. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  481. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  482. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  483. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  484. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  485. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  486. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  487. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  488. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  489. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  490. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
  491. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  492. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  493. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  494. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  495. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  496. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  497. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  498. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  499. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/heart.gif +0 -0
  500. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  501. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  502. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  503. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  504. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  505. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  506. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  507. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  508. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  509. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  510. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  511. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  512. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
  513. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylescombo/styles/default.js +6 -0
  514. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +9 -0
  515. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
  516. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +7 -0
  517. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +6 -0
  518. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  519. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  520. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  521. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
  522. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +6 -0
  523. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +6 -0
  524. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  525. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  526. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  527. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  528. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  529. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
  530. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +76 -0
  531. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
  532. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  533. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
  534. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +7 -0
  535. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +9 -0
  536. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +12 -0
  537. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
  538. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  539. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  540. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  541. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/mini.gif +0 -0
  542. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/noimage.png +0 -0
  543. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites.png +0 -0
  544. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  545. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  546. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +7 -0
  547. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +6 -0
  548. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +9 -0
  549. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +13 -0
  550. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
  551. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  552. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  553. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  554. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/mini.gif +0 -0
  555. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/noimage.png +0 -0
  556. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites.png +0 -0
  557. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  558. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +6 -0
  559. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +6 -0
  560. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +8 -0
  561. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +12 -0
  562. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
  563. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  564. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  565. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  566. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/mini.gif +0 -0
  567. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/noimage.png +0 -0
  568. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites.png +0 -0
  569. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  570. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  571. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +6 -0
  572. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +6 -0
  573. data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +8 -0
  574. data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +83 -0
  575. data/spec/spec.opts +6 -0
  576. data/spec/spec_helper.rb +36 -0
  577. metadata +658 -0
@@ -0,0 +1,1103 @@
1
+ /*
2
+ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+
6
+ (function()
7
+ {
8
+ // #### checkSelectionChange : START
9
+
10
+ // The selection change check basically saves the element parent tree of
11
+ // the current node and check it on successive requests. If there is any
12
+ // change on the tree, then the selectionChange event gets fired.
13
+ function checkSelectionChange()
14
+ {
15
+ try
16
+ {
17
+ // In IE, the "selectionchange" event may still get thrown when
18
+ // releasing the WYSIWYG mode, so we need to check it first.
19
+ var sel = this.getSelection();
20
+ if ( !sel )
21
+ return;
22
+
23
+ var firstElement = sel.getStartElement();
24
+ var currentPath = new CKEDITOR.dom.elementPath( firstElement );
25
+
26
+ if ( !currentPath.compare( this._.selectionPreviousPath ) )
27
+ {
28
+ this._.selectionPreviousPath = currentPath;
29
+ this.fire( 'selectionChange', { selection : sel, path : currentPath, element : firstElement } );
30
+ }
31
+ }
32
+ catch (e)
33
+ {}
34
+ }
35
+
36
+ var checkSelectionChangeTimer,
37
+ checkSelectionChangeTimeoutPending;
38
+
39
+ function checkSelectionChangeTimeout()
40
+ {
41
+ // Firing the "OnSelectionChange" event on every key press started to
42
+ // be too slow. This function guarantees that there will be at least
43
+ // 200ms delay between selection checks.
44
+
45
+ checkSelectionChangeTimeoutPending = true;
46
+
47
+ if ( checkSelectionChangeTimer )
48
+ return;
49
+
50
+ checkSelectionChangeTimeoutExec.call( this );
51
+
52
+ checkSelectionChangeTimer = CKEDITOR.tools.setTimeout( checkSelectionChangeTimeoutExec, 200, this );
53
+ }
54
+
55
+ function checkSelectionChangeTimeoutExec()
56
+ {
57
+ checkSelectionChangeTimer = null;
58
+
59
+ if ( checkSelectionChangeTimeoutPending )
60
+ {
61
+ // Call this with a timeout so the browser properly moves the
62
+ // selection after the mouseup. It happened that the selection was
63
+ // being moved after the mouseup when clicking inside selected text
64
+ // with Firefox.
65
+ CKEDITOR.tools.setTimeout( checkSelectionChange, 0, this );
66
+
67
+ checkSelectionChangeTimeoutPending = false;
68
+ }
69
+ }
70
+
71
+ // #### checkSelectionChange : END
72
+
73
+ var selectAllCmd =
74
+ {
75
+ exec : function( editor )
76
+ {
77
+ switch ( editor.mode )
78
+ {
79
+ case 'wysiwyg' :
80
+ editor.document.$.execCommand( 'SelectAll', false, null );
81
+ break;
82
+ case 'source' :
83
+ // TODO
84
+ }
85
+ },
86
+ canUndo : false
87
+ };
88
+
89
+ CKEDITOR.plugins.add( 'selection',
90
+ {
91
+ init : function( editor )
92
+ {
93
+ editor.on( 'contentDom', function()
94
+ {
95
+ var doc = editor.document,
96
+ body = doc.getBody();
97
+
98
+ if ( CKEDITOR.env.ie )
99
+ {
100
+ // Other browsers don't loose the selection if the
101
+ // editor document loose the focus. In IE, we don't
102
+ // have support for it, so we reproduce it here, other
103
+ // than firing the selection change event.
104
+
105
+ var savedRange,
106
+ saveEnabled;
107
+
108
+ // "onfocusin" is fired before "onfocus". It makes it
109
+ // possible to restore the selection before click
110
+ // events get executed.
111
+ body.on( 'focusin', function()
112
+ {
113
+ // If we have saved a range, restore it at this
114
+ // point.
115
+ if ( savedRange )
116
+ {
117
+ // Well not break because of this.
118
+ try
119
+ {
120
+ savedRange.select();
121
+ }
122
+ catch (e)
123
+ {}
124
+
125
+ savedRange = null;
126
+ }
127
+ });
128
+
129
+ editor.window.on( 'focus', function()
130
+ {
131
+ // Enable selections to be saved.
132
+ saveEnabled = true;
133
+
134
+ saveSelection();
135
+ });
136
+
137
+ body.on( 'beforedeactivate', function()
138
+ {
139
+ // Disable selections from being saved.
140
+ saveEnabled = false;
141
+ });
142
+
143
+ // IE fires the "selectionchange" event when clicking
144
+ // inside a selection. We don't want to capture that.
145
+ body.on( 'mousedown', disableSave );
146
+ body.on( 'mouseup',
147
+ function()
148
+ {
149
+ saveEnabled = true;
150
+ setTimeout( function()
151
+ {
152
+ saveSelection( true );
153
+ },
154
+ 0 );
155
+ });
156
+
157
+ body.on( 'keydown', disableSave );
158
+ body.on( 'keyup',
159
+ function()
160
+ {
161
+ saveEnabled = true;
162
+ saveSelection();
163
+ });
164
+
165
+
166
+ // IE is the only to provide the "selectionchange"
167
+ // event.
168
+ doc.on( 'selectionchange', saveSelection );
169
+
170
+ function disableSave()
171
+ {
172
+ saveEnabled = false;
173
+ }
174
+
175
+ function saveSelection( testIt )
176
+ {
177
+ if ( saveEnabled )
178
+ {
179
+ var doc = editor.document,
180
+ sel = doc && doc.$.selection;
181
+
182
+ // There is a very specific case, when clicking
183
+ // inside a text selection. In that case, the
184
+ // selection collapses at the clicking point,
185
+ // but the selection object remains in an
186
+ // unknown state, making createRange return a
187
+ // range at the very start of the document. In
188
+ // such situation we have to test the range, to
189
+ // be sure it's valid.
190
+ if ( testIt && sel && sel.type == 'None' )
191
+ {
192
+ // The "InsertImage" command can be used to
193
+ // test whether the selection is good or not.
194
+ // If not, it's enough to give some time to
195
+ // IE to put things in order for us.
196
+ if ( !doc.$.queryCommandEnabled( 'InsertImage' ) )
197
+ {
198
+ CKEDITOR.tools.setTimeout( saveSelection, 50, this, true );
199
+ return;
200
+ }
201
+ }
202
+
203
+ savedRange = sel && sel.createRange();
204
+
205
+ checkSelectionChangeTimeout.call( editor );
206
+ }
207
+ }
208
+ }
209
+ else
210
+ {
211
+ // In other browsers, we make the selection change
212
+ // check based on other events, like clicks or keys
213
+ // press.
214
+
215
+ doc.on( 'mouseup', checkSelectionChangeTimeout, editor );
216
+ doc.on( 'keyup', checkSelectionChangeTimeout, editor );
217
+ }
218
+ });
219
+
220
+ editor.addCommand( 'selectAll', selectAllCmd );
221
+ editor.ui.addButton( 'SelectAll',
222
+ {
223
+ label : editor.lang.selectAll,
224
+ command : 'selectAll'
225
+ });
226
+
227
+ editor.selectionChange = checkSelectionChangeTimeout;
228
+ }
229
+ });
230
+
231
+ /**
232
+ * Gets the current selection from the editing area when in WYSIWYG mode.
233
+ * @returns {CKEDITOR.dom.selection} A selection object or null if not on
234
+ * WYSIWYG mode or no selection is available.
235
+ * @example
236
+ * var selection = CKEDITOR.instances.editor1.<b>getSelection()</b>;
237
+ * alert( selection.getType() );
238
+ */
239
+ CKEDITOR.editor.prototype.getSelection = function()
240
+ {
241
+ return this.document && this.document.getSelection();
242
+ };
243
+
244
+ CKEDITOR.editor.prototype.forceNextSelectionCheck = function()
245
+ {
246
+ delete this._.selectionPreviousPath;
247
+ };
248
+
249
+ /**
250
+ * Gets the current selection from the document.
251
+ * @returns {CKEDITOR.dom.selection} A selection object.
252
+ * @example
253
+ * var selection = CKEDITOR.instances.editor1.document.<b>getSelection()</b>;
254
+ * alert( selection.getType() );
255
+ */
256
+ CKEDITOR.dom.document.prototype.getSelection = function()
257
+ {
258
+ var sel = new CKEDITOR.dom.selection( this );
259
+ return ( !sel || sel.isInvalid ) ? null : sel;
260
+ };
261
+
262
+ /**
263
+ * No selection.
264
+ * @constant
265
+ * @example
266
+ * if ( editor.getSelection().getType() == CKEDITOR.SELECTION_NONE )
267
+ * alert( 'Nothing is selected' );
268
+ */
269
+ CKEDITOR.SELECTION_NONE = 1;
270
+
271
+ /**
272
+ * Text or collapsed selection.
273
+ * @constant
274
+ * @example
275
+ * if ( editor.getSelection().getType() == CKEDITOR.SELECTION_TEXT )
276
+ * alert( 'Text is selected' );
277
+ */
278
+ CKEDITOR.SELECTION_TEXT = 2;
279
+
280
+ /**
281
+ * Element selection.
282
+ * @constant
283
+ * @example
284
+ * if ( editor.getSelection().getType() == CKEDITOR.SELECTION_ELEMENT )
285
+ * alert( 'An element is selected' );
286
+ */
287
+ CKEDITOR.SELECTION_ELEMENT = 3;
288
+
289
+ /**
290
+ * Manipulates the selection in a DOM document.
291
+ * @constructor
292
+ * @example
293
+ */
294
+ CKEDITOR.dom.selection = function( document )
295
+ {
296
+ var lockedSelection = document.getCustomData( 'cke_locked_selection' );
297
+
298
+ if ( lockedSelection )
299
+ return lockedSelection;
300
+
301
+ this.document = document;
302
+ this.isLocked = false;
303
+ this._ =
304
+ {
305
+ cache : {}
306
+ };
307
+
308
+ /**
309
+ * IE BUG: The selection's document may be a different document than the
310
+ * editor document. Return null if that's the case.
311
+ */
312
+ if ( CKEDITOR.env.ie )
313
+ {
314
+ var range = this.getNative().createRange();
315
+ if ( !range
316
+ || ( range.item && range.item(0).ownerDocument != this.document.$ )
317
+ || ( range.parentElement && range.parentElement().ownerDocument != this.document.$ ) )
318
+ {
319
+ this.isInvalid = true;
320
+ }
321
+ }
322
+
323
+ return this;
324
+ };
325
+
326
+ var styleObjectElements =
327
+ {
328
+ img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,
329
+ a:1, input:1, form:1, select:1, textarea:1, button:1, fieldset:1, th:1, thead:1, tfoot:1
330
+ };
331
+
332
+ CKEDITOR.dom.selection.prototype =
333
+ {
334
+ /**
335
+ * Gets the native selection object from the browser.
336
+ * @function
337
+ * @returns {Object} The native selection object.
338
+ * @example
339
+ * var selection = editor.getSelection().<b>getNative()</b>;
340
+ */
341
+ getNative :
342
+ CKEDITOR.env.ie ?
343
+ function()
344
+ {
345
+ return this._.cache.nativeSel || ( this._.cache.nativeSel = this.document.$.selection );
346
+ }
347
+ :
348
+ function()
349
+ {
350
+ return this._.cache.nativeSel || ( this._.cache.nativeSel = this.document.getWindow().$.getSelection() );
351
+ },
352
+
353
+ /**
354
+ * Gets the type of the current selection. The following values are
355
+ * available:
356
+ * <ul>
357
+ * <li>{@link CKEDITOR.SELECTION_NONE} (1): No selection.</li>
358
+ * <li>{@link CKEDITOR.SELECTION_TEXT} (2): Text is selected or
359
+ * collapsed selection.</li>
360
+ * <li>{@link CKEDITOR.SELECTION_ELEMENT} (3): A element
361
+ * selection.</li>
362
+ * </ul>
363
+ * @function
364
+ * @returns {Number} One of the following constant values:
365
+ * {@link CKEDITOR.SELECTION_NONE}, {@link CKEDITOR.SELECTION_TEXT} or
366
+ * {@link CKEDITOR.SELECTION_ELEMENT}.
367
+ * @example
368
+ * if ( editor.getSelection().<b>getType()</b> == CKEDITOR.SELECTION_TEXT )
369
+ * alert( 'Text is selected' );
370
+ */
371
+ getType :
372
+ CKEDITOR.env.ie ?
373
+ function()
374
+ {
375
+ var cache = this._.cache;
376
+ if ( cache.type )
377
+ return cache.type;
378
+
379
+ var type = CKEDITOR.SELECTION_NONE;
380
+
381
+ try
382
+ {
383
+ var sel = this.getNative(),
384
+ ieType = sel.type;
385
+
386
+ if ( ieType == 'Text' )
387
+ type = CKEDITOR.SELECTION_TEXT;
388
+
389
+ if ( ieType == 'Control' )
390
+ type = CKEDITOR.SELECTION_ELEMENT;
391
+
392
+ // It is possible that we can still get a text range
393
+ // object even when type == 'None' is returned by IE.
394
+ // So we'd better check the object returned by
395
+ // createRange() rather than by looking at the type.
396
+ if ( sel.createRange().parentElement )
397
+ type = CKEDITOR.SELECTION_TEXT;
398
+ }
399
+ catch(e) {}
400
+
401
+ return ( cache.type = type );
402
+ }
403
+ :
404
+ function()
405
+ {
406
+ var cache = this._.cache;
407
+ if ( cache.type )
408
+ return cache.type;
409
+
410
+ var type = CKEDITOR.SELECTION_TEXT;
411
+
412
+ var sel = this.getNative();
413
+
414
+ if ( !sel )
415
+ type = CKEDITOR.SELECTION_NONE;
416
+ else if ( sel.rangeCount == 1 )
417
+ {
418
+ // Check if the actual selection is a control (IMG,
419
+ // TABLE, HR, etc...).
420
+
421
+ var range = sel.getRangeAt(0),
422
+ startContainer = range.startContainer;
423
+
424
+ if ( startContainer == range.endContainer
425
+ && startContainer.nodeType == 1
426
+ && ( range.endOffset - range.startOffset ) == 1
427
+ && styleObjectElements[ startContainer.childNodes[ range.startOffset ].nodeName.toLowerCase() ] )
428
+ {
429
+ type = CKEDITOR.SELECTION_ELEMENT;
430
+ }
431
+ }
432
+
433
+ return ( cache.type = type );
434
+ },
435
+
436
+ getRanges :
437
+ CKEDITOR.env.ie ?
438
+ ( function()
439
+ {
440
+ // Finds the container and offset for a specific boundary
441
+ // of an IE range.
442
+ var getBoundaryInformation = function( range, start )
443
+ {
444
+ // Creates a collapsed range at the requested boundary.
445
+ range = range.duplicate();
446
+ range.collapse( start );
447
+
448
+ // Gets the element that encloses the range entirely.
449
+ var parent = range.parentElement();
450
+ var siblings = parent.childNodes;
451
+
452
+ var testRange;
453
+
454
+ for ( var i = 0 ; i < siblings.length ; i++ )
455
+ {
456
+ var child = siblings[ i ];
457
+ if ( child.nodeType == 1 )
458
+ {
459
+ testRange = range.duplicate();
460
+
461
+ testRange.moveToElementText( child );
462
+
463
+ var comparisonStart = testRange.compareEndPoints( 'StartToStart', range ),
464
+ comparisonEnd = testRange.compareEndPoints( 'EndToStart', range );
465
+
466
+ testRange.collapse();
467
+
468
+ if ( comparisonStart > 0 )
469
+ break;
470
+ // When selection stay at the side of certain self-closing elements, e.g. BR,
471
+ // our comparison will never shows an equality. (#4824)
472
+ else if ( !comparisonStart
473
+ || comparisonEnd == 1 && comparisonStart == -1 )
474
+ return { container : parent, offset : i };
475
+ else if ( !comparisonEnd )
476
+ return { container : parent, offset : i + 1 };
477
+
478
+ testRange = null;
479
+ }
480
+ }
481
+
482
+ if ( !testRange )
483
+ {
484
+ testRange = range.duplicate();
485
+ testRange.moveToElementText( parent );
486
+ testRange.collapse( false );
487
+ }
488
+
489
+ testRange.setEndPoint( 'StartToStart', range );
490
+ // IE report line break as CRLF with range.text but
491
+ // only LF with textnode.nodeValue, normalize them to avoid
492
+ // breaking character counting logic below. (#3949)
493
+ var distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
494
+
495
+ try
496
+ {
497
+ while ( distance > 0 )
498
+ distance -= siblings[ --i ].nodeValue.length;
499
+ }
500
+ // Measurement in IE could be somtimes wrong because of <select> element. (#4611)
501
+ catch( e )
502
+ {
503
+ distance = 0;
504
+ }
505
+
506
+
507
+ if ( distance === 0 )
508
+ {
509
+ return {
510
+ container : parent,
511
+ offset : i
512
+ };
513
+ }
514
+ else
515
+ {
516
+ return {
517
+ container : siblings[ i ],
518
+ offset : -distance
519
+ };
520
+ }
521
+ };
522
+
523
+ return function()
524
+ {
525
+ var cache = this._.cache;
526
+ if ( cache.ranges )
527
+ return cache.ranges;
528
+
529
+ // IE doesn't have range support (in the W3C way), so we
530
+ // need to do some magic to transform selections into
531
+ // CKEDITOR.dom.range instances.
532
+
533
+ var sel = this.getNative(),
534
+ nativeRange = sel && sel.createRange(),
535
+ type = this.getType(),
536
+ range;
537
+
538
+ if ( !sel )
539
+ return [];
540
+
541
+ if ( type == CKEDITOR.SELECTION_TEXT )
542
+ {
543
+ range = new CKEDITOR.dom.range( this.document );
544
+
545
+ var boundaryInfo = getBoundaryInformation( nativeRange, true );
546
+ range.setStart( new CKEDITOR.dom.node( boundaryInfo.container ), boundaryInfo.offset );
547
+
548
+ boundaryInfo = getBoundaryInformation( nativeRange );
549
+ range.setEnd( new CKEDITOR.dom.node( boundaryInfo.container ), boundaryInfo.offset );
550
+
551
+ return ( cache.ranges = [ range ] );
552
+ }
553
+ else if ( type == CKEDITOR.SELECTION_ELEMENT )
554
+ {
555
+ var retval = this._.cache.ranges = [];
556
+
557
+ for ( var i = 0 ; i < nativeRange.length ; i++ )
558
+ {
559
+ var element = nativeRange.item( i ),
560
+ parentElement = element.parentNode,
561
+ j = 0;
562
+
563
+ range = new CKEDITOR.dom.range( this.document );
564
+
565
+ for (; j < parentElement.childNodes.length && parentElement.childNodes[j] != element ; j++ )
566
+ { /*jsl:pass*/ }
567
+
568
+ range.setStart( new CKEDITOR.dom.node( parentElement ), j );
569
+ range.setEnd( new CKEDITOR.dom.node( parentElement ), j + 1 );
570
+ retval.push( range );
571
+ }
572
+
573
+ return retval;
574
+ }
575
+
576
+ return ( cache.ranges = [] );
577
+ };
578
+ })()
579
+ :
580
+ function()
581
+ {
582
+ var cache = this._.cache;
583
+ if ( cache.ranges )
584
+ return cache.ranges;
585
+
586
+ // On browsers implementing the W3C range, we simply
587
+ // tranform the native ranges in CKEDITOR.dom.range
588
+ // instances.
589
+
590
+ var ranges = [];
591
+ var sel = this.getNative();
592
+
593
+ if ( !sel )
594
+ return [];
595
+
596
+ for ( var i = 0 ; i < sel.rangeCount ; i++ )
597
+ {
598
+ var nativeRange = sel.getRangeAt( i );
599
+ var range = new CKEDITOR.dom.range( this.document );
600
+
601
+ range.setStart( new CKEDITOR.dom.node( nativeRange.startContainer ), nativeRange.startOffset );
602
+ range.setEnd( new CKEDITOR.dom.node( nativeRange.endContainer ), nativeRange.endOffset );
603
+ ranges.push( range );
604
+ }
605
+
606
+ return ( cache.ranges = ranges );
607
+ },
608
+
609
+ /**
610
+ * Gets the DOM element in which the selection starts.
611
+ * @returns {CKEDITOR.dom.element} The element at the beginning of the
612
+ * selection.
613
+ * @example
614
+ * var element = editor.getSelection().<b>getStartElement()</b>;
615
+ * alert( element.getName() );
616
+ */
617
+ getStartElement : function()
618
+ {
619
+ var cache = this._.cache;
620
+ if ( cache.startElement !== undefined )
621
+ return cache.startElement;
622
+
623
+ var node,
624
+ sel = this.getNative();
625
+
626
+ switch ( this.getType() )
627
+ {
628
+ case CKEDITOR.SELECTION_ELEMENT :
629
+ return this.getSelectedElement();
630
+
631
+ case CKEDITOR.SELECTION_TEXT :
632
+
633
+ var range = this.getRanges()[0];
634
+
635
+ if ( range )
636
+ {
637
+ if ( !range.collapsed )
638
+ {
639
+ range.optimize();
640
+
641
+ // Decrease the range content to exclude particial
642
+ // selected node on the start which doesn't have
643
+ // visual impact. ( #3231 )
644
+ while ( true )
645
+ {
646
+ var startContainer = range.startContainer,
647
+ startOffset = range.startOffset;
648
+ // Limit the fix only to non-block elements.(#3950)
649
+ if ( startOffset == ( startContainer.getChildCount ?
650
+ startContainer.getChildCount() : startContainer.getLength() )
651
+ && !startContainer.isBlockBoundary() )
652
+ range.setStartAfter( startContainer );
653
+ else break;
654
+ }
655
+
656
+ node = range.startContainer;
657
+
658
+ if ( node.type != CKEDITOR.NODE_ELEMENT )
659
+ return node.getParent();
660
+
661
+ node = node.getChild( range.startOffset );
662
+
663
+ if ( !node || node.type != CKEDITOR.NODE_ELEMENT )
664
+ return range.startContainer;
665
+
666
+ var child = node.getFirst();
667
+ while ( child && child.type == CKEDITOR.NODE_ELEMENT )
668
+ {
669
+ node = child;
670
+ child = child.getFirst();
671
+ }
672
+
673
+ return node;
674
+ }
675
+ }
676
+
677
+ if ( CKEDITOR.env.ie )
678
+ {
679
+ range = sel.createRange();
680
+ range.collapse( true );
681
+
682
+ node = range.parentElement();
683
+ }
684
+ else
685
+ {
686
+ node = sel.anchorNode;
687
+
688
+ if ( node && node.nodeType != 1 )
689
+ node = node.parentNode;
690
+ }
691
+ }
692
+
693
+ return cache.startElement = ( node ? new CKEDITOR.dom.element( node ) : null );
694
+ },
695
+
696
+ /**
697
+ * Gets the current selected element.
698
+ * @returns {CKEDITOR.dom.element} The selected element. Null if no
699
+ * selection is available or the selection type is not
700
+ * {@link CKEDITOR.SELECTION_ELEMENT}.
701
+ * @example
702
+ * var element = editor.getSelection().<b>getSelectedElement()</b>;
703
+ * alert( element.getName() );
704
+ */
705
+ getSelectedElement : function()
706
+ {
707
+ var cache = this._.cache;
708
+ if ( cache.selectedElement !== undefined )
709
+ return cache.selectedElement;
710
+
711
+ var node;
712
+
713
+ if ( this.getType() == CKEDITOR.SELECTION_ELEMENT )
714
+ {
715
+ var sel = this.getNative();
716
+
717
+ if ( CKEDITOR.env.ie )
718
+ {
719
+ try
720
+ {
721
+ node = sel.createRange().item(0);
722
+ }
723
+ catch(e) {}
724
+ }
725
+ else
726
+ {
727
+ var range = sel.getRangeAt( 0 );
728
+ node = range.startContainer.childNodes[ range.startOffset ];
729
+ }
730
+ }
731
+
732
+ return cache.selectedElement = ( node ? new CKEDITOR.dom.element( node ) : null );
733
+ },
734
+
735
+ lock : function()
736
+ {
737
+ // Call all cacheable function.
738
+ this.getRanges();
739
+ this.getStartElement();
740
+ this.getSelectedElement();
741
+
742
+ // The native selection is not available when locked.
743
+ this._.cache.nativeSel = {};
744
+
745
+ this.isLocked = true;
746
+
747
+ // Save this selection inside the DOM document.
748
+ this.document.setCustomData( 'cke_locked_selection', this );
749
+ },
750
+
751
+ unlock : function( restore )
752
+ {
753
+ var doc = this.document,
754
+ lockedSelection = doc.getCustomData( 'cke_locked_selection' );
755
+
756
+ if ( lockedSelection )
757
+ {
758
+ doc.setCustomData( 'cke_locked_selection', null );
759
+
760
+ if ( restore )
761
+ {
762
+ var selectedElement = lockedSelection.getSelectedElement(),
763
+ ranges = !selectedElement && lockedSelection.getRanges();
764
+
765
+ this.isLocked = false;
766
+ this.reset();
767
+
768
+ doc.getBody().focus();
769
+
770
+ if ( selectedElement )
771
+ this.selectElement( selectedElement );
772
+ else
773
+ this.selectRanges( ranges );
774
+ }
775
+ }
776
+
777
+ if ( !lockedSelection || !restore )
778
+ {
779
+ this.isLocked = false;
780
+ this.reset();
781
+ }
782
+ },
783
+
784
+ reset : function()
785
+ {
786
+ this._.cache = {};
787
+ },
788
+
789
+ selectElement : function( element )
790
+ {
791
+ if ( this.isLocked )
792
+ {
793
+ var range = new CKEDITOR.dom.range( this.document );
794
+ range.setStartBefore( element );
795
+ range.setEndAfter( element );
796
+
797
+ this._.cache.selectedElement = element;
798
+ this._.cache.startElement = element;
799
+ this._.cache.ranges = [ range ];
800
+ this._.cache.type = CKEDITOR.SELECTION_ELEMENT;
801
+
802
+ return;
803
+ }
804
+
805
+ if ( CKEDITOR.env.ie )
806
+ {
807
+ this.getNative().empty();
808
+
809
+ try
810
+ {
811
+ // Try to select the node as a control.
812
+ range = this.document.$.body.createControlRange();
813
+ range.addElement( element.$ );
814
+ range.select();
815
+ }
816
+ catch(e)
817
+ {
818
+ // If failed, select it as a text range.
819
+ range = this.document.$.body.createTextRange();
820
+ range.moveToElementText( element.$ );
821
+ range.select();
822
+ }
823
+
824
+ this.reset();
825
+ }
826
+ else
827
+ {
828
+ // Create the range for the element.
829
+ range = this.document.$.createRange();
830
+ range.selectNode( element.$ );
831
+
832
+ // Select the range.
833
+ var sel = this.getNative();
834
+ sel.removeAllRanges();
835
+ sel.addRange( range );
836
+
837
+ this.reset();
838
+ }
839
+ },
840
+
841
+ selectRanges : function( ranges )
842
+ {
843
+ if ( this.isLocked )
844
+ {
845
+ this._.cache.selectedElement = null;
846
+ this._.cache.startElement = ranges[ 0 ].getTouchedStartNode();
847
+ this._.cache.ranges = ranges;
848
+ this._.cache.type = CKEDITOR.SELECTION_TEXT;
849
+
850
+ return;
851
+ }
852
+
853
+ if ( CKEDITOR.env.ie )
854
+ {
855
+ // IE doesn't accept multiple ranges selection, so we just
856
+ // select the first one.
857
+ if ( ranges[ 0 ] )
858
+ ranges[ 0 ].select();
859
+
860
+ this.reset();
861
+ }
862
+ else
863
+ {
864
+ var sel = this.getNative();
865
+ sel.removeAllRanges();
866
+
867
+ for ( var i = 0 ; i < ranges.length ; i++ )
868
+ {
869
+ var range = ranges[ i ];
870
+ var nativeRange = this.document.$.createRange();
871
+ var startContainer = range.startContainer;
872
+
873
+ // In FF2, if we have a collapsed range, inside an empty
874
+ // element, we must add something to it otherwise the caret
875
+ // will not be visible.
876
+ if ( range.collapsed &&
877
+ ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) &&
878
+ startContainer.type == CKEDITOR.NODE_ELEMENT &&
879
+ !startContainer.getChildCount() )
880
+ {
881
+ startContainer.appendText( '' );
882
+ }
883
+
884
+ nativeRange.setStart( startContainer.$, range.startOffset );
885
+ nativeRange.setEnd( range.endContainer.$, range.endOffset );
886
+
887
+ // Select the range.
888
+ sel.addRange( nativeRange );
889
+ }
890
+
891
+ this.reset();
892
+ }
893
+ },
894
+
895
+ createBookmarks : function( serializable )
896
+ {
897
+ var retval = [],
898
+ ranges = this.getRanges(),
899
+ length = ranges.length,
900
+ bookmark;
901
+ for ( var i = 0; i < length ; i++ )
902
+ {
903
+ retval.push( bookmark = ranges[ i ].createBookmark( serializable, true ) );
904
+
905
+ serializable = bookmark.serializable;
906
+
907
+ var bookmarkStart = serializable ? this.document.getById( bookmark.startNode ) : bookmark.startNode,
908
+ bookmarkEnd = serializable ? this.document.getById( bookmark.endNode ) : bookmark.endNode;
909
+
910
+ // Updating the offset values for rest of ranges which have been mangled(#3256).
911
+ for ( var j = i + 1 ; j < length ; j++ )
912
+ {
913
+ var dirtyRange = ranges[ j ],
914
+ rangeStart = dirtyRange.startContainer,
915
+ rangeEnd = dirtyRange.endContainer;
916
+
917
+ rangeStart.equals( bookmarkStart.getParent() ) && dirtyRange.startOffset++;
918
+ rangeStart.equals( bookmarkEnd.getParent() ) && dirtyRange.startOffset++;
919
+ rangeEnd.equals( bookmarkStart.getParent() ) && dirtyRange.endOffset++;
920
+ rangeEnd.equals( bookmarkEnd.getParent() ) && dirtyRange.endOffset++;
921
+ }
922
+ }
923
+
924
+ return retval;
925
+ },
926
+
927
+ createBookmarks2 : function( normalized )
928
+ {
929
+ var bookmarks = [],
930
+ ranges = this.getRanges();
931
+
932
+ for ( var i = 0 ; i < ranges.length ; i++ )
933
+ bookmarks.push( ranges[i].createBookmark2( normalized ) );
934
+
935
+ return bookmarks;
936
+ },
937
+
938
+ selectBookmarks : function( bookmarks )
939
+ {
940
+ var ranges = [];
941
+ for ( var i = 0 ; i < bookmarks.length ; i++ )
942
+ {
943
+ var range = new CKEDITOR.dom.range( this.document );
944
+ range.moveToBookmark( bookmarks[i] );
945
+ ranges.push( range );
946
+ }
947
+ this.selectRanges( ranges );
948
+ return this;
949
+ },
950
+
951
+ getCommonAncestor : function()
952
+ {
953
+ var ranges = this.getRanges(),
954
+ startNode = ranges[ 0 ].startContainer,
955
+ endNode = ranges[ ranges.length - 1 ].endContainer;
956
+ return startNode.getCommonAncestor( endNode );
957
+ },
958
+
959
+ // Moving scroll bar to the current selection's start position.
960
+ scrollIntoView : function()
961
+ {
962
+ // If we have split the block, adds a temporary span at the
963
+ // range position and scroll relatively to it.
964
+ var start = this.getStartElement();
965
+ start.scrollIntoView();
966
+ }
967
+ };
968
+ })();
969
+ ( function()
970
+ {
971
+ var notWhitespaces = CKEDITOR.dom.walker.whitespaces( true );
972
+ var fillerTextRegex = /\ufeff|\u00a0/;
973
+
974
+ CKEDITOR.dom.range.prototype.select =
975
+ CKEDITOR.env.ie ?
976
+ // V2
977
+ function( forceExpand )
978
+ {
979
+ var collapsed = this.collapsed;
980
+ var isStartMarkerAlone;
981
+ var dummySpan;
982
+
983
+ var bookmark = this.createBookmark();
984
+
985
+ // Create marker tags for the start and end boundaries.
986
+ var startNode = bookmark.startNode;
987
+
988
+ var endNode;
989
+ if ( !collapsed )
990
+ endNode = bookmark.endNode;
991
+
992
+ // Create the main range which will be used for the selection.
993
+ var ieRange = this.document.$.body.createTextRange();
994
+
995
+ // Position the range at the start boundary.
996
+ ieRange.moveToElementText( startNode.$ );
997
+ ieRange.moveStart( 'character', 1 );
998
+
999
+ if ( endNode )
1000
+ {
1001
+ // Create a tool range for the end.
1002
+ var ieRangeEnd = this.document.$.body.createTextRange();
1003
+
1004
+ // Position the tool range at the end.
1005
+ ieRangeEnd.moveToElementText( endNode.$ );
1006
+
1007
+ // Move the end boundary of the main range to match the tool range.
1008
+ ieRange.setEndPoint( 'EndToEnd', ieRangeEnd );
1009
+ ieRange.moveEnd( 'character', -1 );
1010
+ }
1011
+ else
1012
+ {
1013
+ // The isStartMarkerAlone logic comes from V2. It guarantees that the lines
1014
+ // will expand and that the cursor will be blinking on the right place.
1015
+ // Actually, we are using this flag just to avoid using this hack in all
1016
+ // situations, but just on those needed.
1017
+ var next = startNode.getNext( notWhitespaces );
1018
+ isStartMarkerAlone = ( !( next && next.getText && next.getText().match( fillerTextRegex ) ) // already a filler there?
1019
+ && ( forceExpand || !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ) ) );
1020
+
1021
+ // Append a temporary <span>&#65279;</span> before the selection.
1022
+ // This is needed to avoid IE destroying selections inside empty
1023
+ // inline elements, like <b></b> (#253).
1024
+ // It is also needed when placing the selection right after an inline
1025
+ // element to avoid the selection moving inside of it.
1026
+ dummySpan = this.document.createElement( 'span' );
1027
+ dummySpan.setHtml( '&#65279;' ); // Zero Width No-Break Space (U+FEFF). See #1359.
1028
+ dummySpan.insertBefore( startNode );
1029
+
1030
+ if ( isStartMarkerAlone )
1031
+ {
1032
+ // To expand empty blocks or line spaces after <br>, we need
1033
+ // instead to have any char, which will be later deleted using the
1034
+ // selection.
1035
+ // \ufeff = Zero Width No-Break Space (U+FEFF). (#1359)
1036
+ this.document.createText( '\ufeff' ).insertBefore( startNode );
1037
+ }
1038
+ }
1039
+
1040
+ // Remove the markers (reset the position, because of the changes in the DOM tree).
1041
+ this.setStartBefore( startNode );
1042
+ startNode.remove();
1043
+
1044
+ if ( collapsed )
1045
+ {
1046
+ if ( isStartMarkerAlone )
1047
+ {
1048
+ // Move the selection start to include the temporary \ufeff.
1049
+ ieRange.moveStart( 'character', -1 );
1050
+
1051
+ ieRange.select();
1052
+
1053
+ // Remove our temporary stuff.
1054
+ this.document.$.selection.clear();
1055
+ }
1056
+ else
1057
+ ieRange.select();
1058
+
1059
+ dummySpan.remove();
1060
+ }
1061
+ else
1062
+ {
1063
+ this.setEndBefore( endNode );
1064
+ endNode.remove();
1065
+ ieRange.select();
1066
+ }
1067
+ }
1068
+ :
1069
+ function()
1070
+ {
1071
+ var startContainer = this.startContainer;
1072
+
1073
+ // If we have a collapsed range, inside an empty element, we must add
1074
+ // something to it, otherwise the caret will not be visible.
1075
+ if ( this.collapsed && startContainer.type == CKEDITOR.NODE_ELEMENT && !startContainer.getChildCount() )
1076
+ startContainer.append( new CKEDITOR.dom.text( '' ) );
1077
+
1078
+ var nativeRange = this.document.$.createRange();
1079
+ nativeRange.setStart( startContainer.$, this.startOffset );
1080
+
1081
+ try
1082
+ {
1083
+ nativeRange.setEnd( this.endContainer.$, this.endOffset );
1084
+ }
1085
+ catch ( e )
1086
+ {
1087
+ // There is a bug in Firefox implementation (it would be too easy
1088
+ // otherwise). The new start can't be after the end (W3C says it can).
1089
+ // So, let's create a new range and collapse it to the desired point.
1090
+ if ( e.toString().indexOf( 'NS_ERROR_ILLEGAL_VALUE' ) >= 0 )
1091
+ {
1092
+ this.collapse( true );
1093
+ nativeRange.setEnd( this.endContainer.$, this.endOffset );
1094
+ }
1095
+ else
1096
+ throw( e );
1097
+ }
1098
+
1099
+ var selection = this.document.getSelection().getNative();
1100
+ selection.removeAllRanges();
1101
+ selection.addRange( nativeRange );
1102
+ };
1103
+ } )();