radiant-ck_editor_filter-extension 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. data/README.markdown +7 -1
  2. data/VERSION +1 -1
  3. data/ck_editor_filter_extension.rb +1 -1
  4. data/public/javascripts/extensions/ck_editor_filter/ckeditor/CHANGES.html +1130 -373
  5. data/public/javascripts/extensions/ck_editor_filter/ckeditor/INSTALL.html +2 -2
  6. data/public/javascripts/extensions/ck_editor_filter/ckeditor/LICENSE.html +2 -2
  7. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/application.xml +32 -0
  8. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/run.bat +9 -0
  9. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/run.sh +8 -0
  10. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/adobeair/sample.html +45 -0
  11. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ajax.html +23 -25
  12. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api.html +64 -24
  13. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog.html +36 -19
  14. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/api_dialog/my_dialog.js +1 -1
  15. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/advanced.asp +105 -0
  16. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/events.asp +136 -0
  17. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/index.html +103 -0
  18. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/replace.asp +72 -0
  19. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/replaceall.asp +77 -0
  20. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/sample_posteddata.asp +46 -0
  21. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/asp/standalone.asp +72 -0
  22. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/_posteddata.php +59 -0
  23. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_for_flash.fla +0 -0
  24. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_for_flash.swf +0 -0
  25. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/output_xhtml.css +204 -0
  26. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/parsesample.css +70 -0
  27. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/assets/swfobject.js +18 -0
  28. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/autogrow.html +103 -0
  29. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/bbcode.html +136 -0
  30. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/devtools.html +94 -0
  31. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/divreplace.html +27 -10
  32. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/enterkey.html +39 -12
  33. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/fullpage.html +33 -13
  34. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/index.html +88 -25
  35. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/jqueryadapter.html +34 -8
  36. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_for_flash.html +275 -0
  37. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_html.html +285 -0
  38. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/output_xhtml.html +181 -0
  39. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/advanced.php +56 -29
  40. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/events.php +58 -35
  41. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/index.html +47 -0
  42. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replace.php +48 -24
  43. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/replaceall.php +50 -30
  44. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/php/standalone.php +52 -33
  45. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/placeholder.html +81 -0
  46. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/readonly.html +91 -0
  47. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebyclass.html +22 -7
  48. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/replacebycode.html +25 -8
  49. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.css +85 -3
  50. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample.js +1 -1
  51. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sample_posteddata.php +21 -59
  52. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/sharedspaces.html +32 -10
  53. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/skins.html +38 -11
  54. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/stylesheetparser.html +93 -0
  55. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/tableresize.html +115 -0
  56. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_color.html +49 -7
  57. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_samples/ui_languages.html +53 -23
  58. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/adapters/jquery.js +17 -8
  59. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/_bootstrap.js +21 -18
  60. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor.js +42 -4
  61. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_base.js +66 -29
  62. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ckeditor_basic.js +12 -15
  63. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/command.js +138 -2
  64. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/commanddefinition.js +59 -16
  65. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/config.js +142 -18
  66. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dataprocessor.js +6 -7
  67. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom.js +2 -3
  68. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/comment.js +1 -1
  69. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/document.js +29 -2
  70. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/documentfragment.js +3 -3
  71. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/domobject.js +59 -11
  72. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/element.js +249 -27
  73. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/elementpath.js +18 -3
  74. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/event.js +1 -1
  75. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/node.js +84 -56
  76. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/nodelist.js +4 -1
  77. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/range.js +345 -48
  78. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/rangelist.js +213 -0
  79. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/text.js +6 -1
  80. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/walker.js +40 -29
  81. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dom/window.js +1 -1
  82. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/dtd.js +15 -11
  83. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor.js +336 -15
  84. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/editor_basic.js +19 -12
  85. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/env.js +80 -17
  86. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/event.js +12 -6
  87. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/eventInfo.js +5 -5
  88. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/focusmanager.js +27 -12
  89. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser.js +17 -5
  90. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/basicwriter.js +3 -3
  91. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/cdata.js +1 -1
  92. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/comment.js +1 -1
  93. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/element.js +14 -5
  94. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/filter.js +34 -8
  95. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/fragment.js +105 -108
  96. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/htmlparser/text.js +1 -1
  97. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/lang.js +12 -7
  98. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/loader.js +7 -9
  99. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugindefinition.js +18 -1
  100. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/plugins.js +21 -3
  101. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/resourcemanager.js +1 -1
  102. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/scriptloader.js +7 -25
  103. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/skins.js +5 -25
  104. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/themes.js +1 -1
  105. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/tools.js +61 -12
  106. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ui.js +13 -1
  107. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_languages.js +2 -1
  108. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/_translationstatus.txt +58 -57
  109. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/af.js +521 -410
  110. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ar.js +160 -49
  111. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bg.js +162 -51
  112. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bn.js +162 -51
  113. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/bs.js +162 -51
  114. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ca.js +260 -149
  115. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cs.js +233 -122
  116. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/cy.js +159 -48
  117. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/da.js +162 -51
  118. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/de.js +217 -106
  119. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/el.js +162 -51
  120. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-au.js +166 -55
  121. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-ca.js +166 -55
  122. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en-gb.js +277 -166
  123. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/en.js +166 -55
  124. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eo.js +162 -51
  125. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/es.js +182 -71
  126. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/et.js +162 -51
  127. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/eu.js +162 -51
  128. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fa.js +162 -51
  129. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fi.js +178 -67
  130. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fo.js +339 -228
  131. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr-ca.js +162 -51
  132. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/fr.js +261 -150
  133. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gl.js +162 -51
  134. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/gu.js +162 -51
  135. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/he.js +179 -68
  136. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hi.js +162 -51
  137. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hr.js +162 -51
  138. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/hu.js +341 -230
  139. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/is.js +162 -51
  140. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/it.js +162 -51
  141. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ja.js +195 -84
  142. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ka.js +810 -0
  143. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/km.js +162 -51
  144. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ko.js +162 -51
  145. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lt.js +162 -51
  146. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/lv.js +162 -51
  147. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/mn.js +162 -51
  148. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ms.js +162 -51
  149. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nb.js +286 -175
  150. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/nl.js +178 -67
  151. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/no.js +286 -175
  152. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pl.js +279 -168
  153. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt-br.js +318 -208
  154. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/pt.js +162 -51
  155. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ro.js +162 -51
  156. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/ru.js +159 -48
  157. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sk.js +192 -81
  158. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sl.js +161 -50
  159. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr-latn.js +162 -51
  160. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sr.js +162 -51
  161. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/sv.js +357 -247
  162. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/th.js +162 -51
  163. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/tr.js +345 -235
  164. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/uk.js +387 -276
  165. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/vi.js +336 -225
  166. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh-cn.js +271 -160
  167. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/lang/zh.js +162 -51
  168. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +16 -5
  169. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/en.js +3 -3
  170. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
  171. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/a11yhelp/plugin.js +4 -3
  172. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/dialogs/about.js +4 -1
  173. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/about/plugin.js +2 -1
  174. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/adobeair/plugin.js +228 -0
  175. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/ajax/plugin.js +152 -0
  176. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/autogrow/plugin.js +88 -0
  177. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/basicstyles/plugin.js +27 -19
  178. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/bbcode/plugin.js +924 -0
  179. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/bidi/plugin.js +331 -0
  180. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/blockquote/plugin.js +8 -4
  181. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/button/plugin.js +70 -55
  182. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/dialogs/paste.js +115 -78
  183. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/clipboard/plugin.js +133 -69
  184. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colorbutton/plugin.js +91 -23
  185. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +192 -43
  186. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/colordialog/plugin.js +12 -10
  187. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/contextmenu/plugin.js +124 -221
  188. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/devtools/lang/en.js +16 -0
  189. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/devtools/plugin.js +173 -0
  190. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/dialogDefinition.js +840 -56
  191. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialog/plugin.js +652 -301
  192. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogadvtab/plugin.js +205 -0
  193. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/dialogui/plugin.js +179 -50
  194. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/dialogs/div.js +40 -40
  195. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/div/plugin.js +4 -4
  196. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/docprops/dialogs/docprops.js +686 -0
  197. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/docprops/plugin.js +22 -0
  198. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/domiterator/plugin.js +59 -53
  199. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/editingblock/plugin.js +62 -17
  200. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/elementspath/plugin.js +137 -108
  201. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/enterkey/plugin.js +117 -47
  202. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/entities/plugin.js +95 -45
  203. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/fakeobjects/plugin.js +22 -16
  204. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/filebrowser/plugin.js +75 -30
  205. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/dialogs/find.js +111 -69
  206. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/find/plugin.js +2 -1
  207. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/dialogs/flash.js +28 -20
  208. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/flash/plugin.js +14 -11
  209. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/floatpanel/plugin.js +50 -21
  210. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/font/plugin.js +3 -2
  211. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/format/plugin.js +17 -13
  212. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/button.js +38 -55
  213. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/checkbox.js +21 -11
  214. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/form.js +6 -6
  215. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +26 -17
  216. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/radio.js +6 -6
  217. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/select.js +13 -7
  218. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textarea.js +4 -4
  219. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/dialogs/textfield.js +11 -5
  220. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
  221. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/forms/plugin.js +112 -41
  222. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/horizontalrule/plugin.js +1 -1
  223. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmldataprocessor/plugin.js +200 -63
  224. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/htmlwriter/plugin.js +26 -21
  225. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/dialogs/iframe.js +257 -0
  226. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/images/placeholder.png +0 -0
  227. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframe/plugin.js +106 -0
  228. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/iframedialog/plugin.js +59 -7
  229. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/dialogs/image.js +243 -218
  230. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/image/plugin.js +19 -2
  231. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/indent/plugin.js +335 -223
  232. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/justify/plugin.js +115 -30
  233. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/keystrokes/plugin.js +3 -7
  234. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/anchor.js +85 -40
  235. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/dialogs/link.js +163 -184
  236. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/link/plugin.js +180 -32
  237. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/list/plugin.js +165 -81
  238. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/listblock/plugin.js +11 -6
  239. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +204 -0
  240. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/liststyle/plugin.js +66 -0
  241. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/maximize/plugin.js +109 -40
  242. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menu/plugin.js +166 -67
  243. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/menubutton/plugin.js +12 -7
  244. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/newpage/plugin.js +3 -3
  245. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pagebreak/plugin.js +95 -29
  246. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panel/plugin.js +43 -20
  247. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/panelbutton/plugin.js +10 -11
  248. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/filter/default.js +316 -119
  249. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastefromword/plugin.js +32 -11
  250. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +19 -29
  251. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/pastetext/plugin.js +15 -79
  252. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/dialogs/placeholder.js +71 -0
  253. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/lang/en.js +16 -0
  254. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/lang/he.js +16 -0
  255. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/placeholder.gif +0 -0
  256. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/placeholder/plugin.js +171 -0
  257. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/popup/plugin.js +9 -7
  258. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/preview/plugin.js +3 -2
  259. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/print/plugin.js +2 -1
  260. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/removeformat/plugin.js +89 -36
  261. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/resize/plugin.js +71 -18
  262. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/richcombo/plugin.js +40 -29
  263. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/save/plugin.js +2 -1
  264. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/dialogs/options.js +114 -110
  265. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/scayt/plugin.js +531 -170
  266. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/selection/plugin.js +791 -331
  267. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  268. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  269. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  270. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  271. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  272. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  273. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  274. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  275. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  276. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  277. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  278. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showblocks/plugin.js +14 -8
  279. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/showborders/plugin.js +63 -26
  280. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/dialogs/smiley.js +31 -22
  281. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/smiley/plugin.js +15 -6
  282. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/sourcearea/plugin.js +18 -14
  283. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +36 -59
  284. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/lang/en.js +89 -0
  285. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/specialchar/plugin.js +45 -4
  286. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/styles/plugin.js +632 -212
  287. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/{stylescombo → styles}/styles/default.js +5 -2
  288. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylescombo/plugin.js +77 -140
  289. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/stylesheetparser/plugin.js +143 -0
  290. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tab/plugin.js +109 -3
  291. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/dialogs/table.js +106 -23
  292. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/table/plugin.js +11 -3
  293. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tableresize/plugin.js +450 -0
  294. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +66 -64
  295. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/tabletools/plugin.js +348 -179
  296. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/dialogs/templates.js +41 -36
  297. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/plugin.js +3 -4
  298. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/templates/templates/default.js +2 -2
  299. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/toolbar/plugin.js +193 -122
  300. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +6 -5
  301. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/en.js +1 -1
  302. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/lang/he.js +15 -0
  303. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/plugin.js +2 -2
  304. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +1 -1
  305. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/undo/plugin.js +73 -12
  306. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +1 -1
  307. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  308. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.css +1 -2
  309. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/dialogs/wsc.js +20 -4
  310. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wsc/plugin.js +2 -2
  311. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/wysiwygarea/plugin.js +751 -251
  312. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/plugins/xml/plugin.js +170 -0
  313. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/dialog.css +116 -18
  314. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/editor.css +1 -1
  315. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/elementspath.css +2 -1
  316. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.css +42 -2
  317. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons.png +0 -0
  318. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  319. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/mainui.css +25 -5
  320. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/menu.css +36 -15
  321. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/panel.css +18 -17
  322. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/presets.css +1 -1
  323. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/reset.css +7 -1
  324. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/richcombo.css +27 -10
  325. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/skin.js +4 -36
  326. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/templates.css +16 -12
  327. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/kama/toolbar.css +69 -83
  328. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/dialog.css +111 -13
  329. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/editor.css +1 -1
  330. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/elementspath.css +2 -1
  331. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.css +40 -1
  332. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons.png +0 -0
  333. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
  334. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/mainui.css +33 -7
  335. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/menu.css +37 -15
  336. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/panel.css +23 -22
  337. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/presets.css +1 -1
  338. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/reset.css +7 -1
  339. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/richcombo.css +40 -20
  340. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/skin.js +10 -17
  341. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/templates.css +16 -10
  342. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/office2003/toolbar.css +79 -32
  343. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/dialog.css +112 -13
  344. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/editor.css +1 -1
  345. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/elementspath.css +2 -1
  346. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.css +40 -1
  347. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons.png +0 -0
  348. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
  349. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/mainui.css +25 -5
  350. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/menu.css +38 -16
  351. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/panel.css +22 -21
  352. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/presets.css +1 -1
  353. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/reset.css +7 -1
  354. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/richcombo.css +36 -23
  355. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/skin.js +10 -17
  356. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/templates.css +16 -10
  357. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/skins/v2/toolbar.css +67 -27
  358. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/themes/default/theme.js +106 -46
  359. data/public/javascripts/extensions/ck_editor_filter/ckeditor/adapters/jquery.js +2 -2
  360. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.asp +955 -0
  361. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.js +141 -117
  362. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.pack +13 -7
  363. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor.php +1 -1
  364. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic.js +4 -4
  365. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_basic_source.js +2 -2
  366. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php4.php +27 -54
  367. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_php5.php +26 -53
  368. data/public/javascripts/extensions/ck_editor_filter/ckeditor/ckeditor_source.js +2 -2
  369. data/public/javascripts/extensions/ck_editor_filter/ckeditor/config.js +1 -1
  370. data/public/javascripts/extensions/ck_editor_filter/ckeditor/contents.css +4 -16
  371. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_languages.js +2 -2
  372. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/_translationstatus.txt +58 -57
  373. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/af.js +2 -2
  374. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ar.js +2 -2
  375. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bg.js +2 -2
  376. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bn.js +2 -2
  377. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/bs.js +2 -2
  378. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ca.js +2 -2
  379. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cs.js +2 -2
  380. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/cy.js +2 -2
  381. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/da.js +2 -2
  382. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/de.js +2 -2
  383. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/el.js +2 -2
  384. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-au.js +2 -2
  385. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-ca.js +2 -2
  386. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en-gb.js +2 -2
  387. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/en.js +2 -2
  388. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eo.js +2 -2
  389. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/es.js +2 -2
  390. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/et.js +2 -2
  391. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/eu.js +2 -2
  392. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fa.js +2 -2
  393. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fi.js +2 -2
  394. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fo.js +2 -2
  395. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr-ca.js +2 -2
  396. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/fr.js +2 -2
  397. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gl.js +2 -2
  398. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/gu.js +2 -2
  399. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/he.js +2 -2
  400. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hi.js +2 -2
  401. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hr.js +2 -2
  402. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/hu.js +2 -2
  403. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/is.js +2 -2
  404. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/it.js +2 -2
  405. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ja.js +2 -2
  406. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ka.js +6 -0
  407. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/km.js +2 -2
  408. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ko.js +2 -2
  409. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lt.js +2 -2
  410. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/lv.js +2 -2
  411. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/mn.js +2 -2
  412. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ms.js +2 -2
  413. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nb.js +2 -2
  414. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/nl.js +2 -2
  415. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/no.js +2 -2
  416. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pl.js +2 -2
  417. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt-br.js +2 -2
  418. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/pt.js +2 -2
  419. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ro.js +2 -2
  420. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/ru.js +2 -2
  421. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sk.js +2 -2
  422. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sl.js +2 -2
  423. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr-latn.js +2 -2
  424. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sr.js +2 -2
  425. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/sv.js +2 -2
  426. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/th.js +2 -2
  427. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/tr.js +2 -2
  428. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/uk.js +2 -2
  429. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/vi.js +2 -2
  430. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh-cn.js +2 -2
  431. data/public/javascripts/extensions/ck_editor_filter/ckeditor/lang/zh.js +2 -2
  432. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +2 -2
  433. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/en.js +2 -2
  434. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
  435. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/about/dialogs/about.js +2 -2
  436. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/adobeair/plugin.js +6 -0
  437. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/ajax/plugin.js +6 -0
  438. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/autogrow/plugin.js +6 -0
  439. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/bbcode/plugin.js +9 -0
  440. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/clipboard/dialogs/paste.js +3 -3
  441. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -2
  442. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/lang/en.js +6 -0
  443. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/devtools/plugin.js +6 -0
  444. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  445. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/div/dialogs/div.js +3 -2
  446. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/dialogs/docprops.js +10 -0
  447. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/docprops/plugin.js +6 -0
  448. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/find/dialogs/find.js +5 -5
  449. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/flash/dialogs/flash.js +5 -5
  450. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/button.js +2 -2
  451. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/checkbox.js +2 -2
  452. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/form.js +2 -2
  453. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/hiddenfield.js +2 -2
  454. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/radio.js +2 -2
  455. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/select.js +4 -4
  456. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textarea.js +2 -2
  457. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/dialogs/textfield.js +2 -2
  458. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  459. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/dialogs/iframe.js +7 -0
  460. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframe/images/placeholder.png +0 -0
  461. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/iframedialog/plugin.js +2 -2
  462. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/image/dialogs/image.js +9 -9
  463. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/anchor.js +2 -2
  464. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/link/dialogs/link.js +7 -7
  465. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/liststyle/dialogs/liststyle.js +6 -0
  466. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastefromword/filter/default.js +7 -6
  467. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/pastetext/dialogs/pastetext.js +2 -2
  468. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/dialogs/placeholder.js +6 -0
  469. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/en.js +6 -0
  470. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/lang/he.js +6 -0
  471. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/placeholder.gif +0 -0
  472. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/placeholder/plugin.js +6 -0
  473. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/radiantpreview/images/radiant-preview.png +0 -0
  474. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/options.js +4 -4
  475. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/scayt/dialogs/toolbar.css +1 -1
  476. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  477. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  478. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  479. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  480. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  481. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  482. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  483. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  484. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  485. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  486. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  487. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/smiley/dialogs/smiley.js +3 -3
  488. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/dialogs/specialchar.js +3 -3
  489. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/specialchar/lang/en.js +6 -0
  490. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/{stylescombo → styles}/styles/default.js +2 -2
  491. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/stylesheetparser/plugin.js +6 -0
  492. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/table/dialogs/table.js +5 -5
  493. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tableresize/plugin.js +7 -0
  494. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/tabletools/dialogs/tableCell.js +4 -4
  495. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/dialogs/templates.js +3 -3
  496. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/templates/templates/default.js +2 -2
  497. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/dialogs/uicolor.js +3 -3
  498. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/en.js +1 -1
  499. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/lang/he.js +6 -0
  500. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/plugin.js +2 -2
  501. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/assets/yui.css +2 -2
  502. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/uicolor/yui/yui.js +1 -1
  503. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
  504. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  505. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.css +2 -2
  506. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/wsc/dialogs/wsc.js +3 -3
  507. data/public/javascripts/extensions/ck_editor_filter/ckeditor/plugins/xml/plugin.js +6 -0
  508. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/dialog.css +5 -5
  509. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/editor.css +9 -8
  510. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons.png +0 -0
  511. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/icons_rtl.png +0 -0
  512. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/skin.js +3 -3
  513. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/kama/templates.css +2 -2
  514. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/dialog.css +5 -5
  515. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/editor.css +10 -9
  516. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons.png +0 -0
  517. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/icons_rtl.png +0 -0
  518. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/skin.js +2 -2
  519. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/office2003/templates.css +2 -2
  520. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/dialog.css +5 -4
  521. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/editor.css +9 -8
  522. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons.png +0 -0
  523. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/icons_rtl.png +0 -0
  524. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/skin.js +2 -2
  525. data/public/javascripts/extensions/ck_editor_filter/ckeditor/skins/v2/templates.css +2 -2
  526. data/public/javascripts/extensions/ck_editor_filter/ckeditor/themes/default/theme.js +4 -4
  527. data/public/javascripts/extensions/ck_editor_filter/radiant.ckeditor.js +21 -12
  528. metadata +94 -9
  529. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/ajax.js +0 -143
  530. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/imagecacher.js +0 -58
  531. data/public/javascripts/extensions/ck_editor_filter/ckeditor/_source/core/xml.js +0 -165
@@ -1,15 +1,15 @@
1
1
  /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
6
6
  (function()
7
7
  {
8
8
  // Elements that may be considered the "Block boundary" in an element path.
9
- var pathBlockElements = { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1 };
9
+ var pathBlockElements = { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1, legend:1 };
10
10
 
11
11
  // Elements that may be considered the "Block limit" in an element path.
12
- var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1 };
12
+ var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1,fieldset:1 };
13
13
 
14
14
  // Check if an element contains any block element.
15
15
  var checkHasBlock = function( element )
@@ -27,6 +27,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
27
27
  return false;
28
28
  };
29
29
 
30
+ /**
31
+ * @class
32
+ */
30
33
  CKEDITOR.dom.elementPath = function( lastNode )
31
34
  {
32
35
  var block = null;
@@ -100,5 +103,17 @@ CKEDITOR.dom.elementPath.prototype =
100
103
  }
101
104
 
102
105
  return true;
106
+ },
107
+
108
+ contains : function( tagNames )
109
+ {
110
+ var elements = this.elements;
111
+ for ( var i = 0 ; i < elements.length ; i++ )
112
+ {
113
+ if ( elements[ i ].getName() in tagNames )
114
+ return elements[ i ];
115
+ }
116
+
117
+ return null;
103
118
  }
104
119
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
@@ -107,24 +107,25 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
107
107
  {
108
108
  var $clone = this.$.cloneNode( includeChildren );
109
109
 
110
- if ( !cloneId )
110
+ var removeIds = function( node )
111
111
  {
112
- var removeIds = function( node )
113
- {
114
- if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
115
- return;
112
+ if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
113
+ return;
116
114
 
117
- node.removeAttribute( 'id', false ) ;
118
- node.removeAttribute( '_cke_expando', false ) ;
115
+ if ( !cloneId )
116
+ node.removeAttribute( 'id', false );
117
+ node.removeAttribute( 'data-cke-expando', false );
119
118
 
119
+ if ( includeChildren )
120
+ {
120
121
  var childs = node.childNodes;
121
- for ( var i=0 ; i < childs.length ; i++ )
122
+ for ( var i=0; i < childs.length; i++ )
122
123
  removeIds( childs[ i ] );
123
- };
124
+ }
125
+ };
124
126
 
125
- // The "id" attribute should never be cloned to avoid duplication.
126
- removeIds( $clone );
127
- }
127
+ // The "id" attribute should never be cloned to avoid duplication.
128
+ removeIds( $clone );
128
129
 
129
130
  return new CKEDITOR.dom.node( $clone );
130
131
  },
@@ -203,29 +204,12 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
203
204
  while ( node && node != $documentElement )
204
205
  {
205
206
  var parentNode = node.parentNode;
206
- var currentIndex = -1;
207
207
 
208
208
  if ( parentNode )
209
209
  {
210
- for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
211
- {
212
- var candidate = parentNode.childNodes[i];
213
-
214
- if ( normalized &&
215
- candidate.nodeType == 3 &&
216
- candidate.previousSibling &&
217
- candidate.previousSibling.nodeType == 3 )
218
- {
219
- continue;
220
- }
221
-
222
- currentIndex++;
223
-
224
- if ( candidate == node )
225
- break;
226
- }
227
-
228
- address.unshift( currentIndex );
210
+ // Get the node index. For performance, call getIndex
211
+ // directly, instead of creating a new node object.
212
+ address.unshift( this.getIndex.call( { $ : node }, normalized ) );
229
213
  }
230
214
 
231
215
  node = parentNode;
@@ -243,33 +227,31 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
243
227
  */
244
228
  getDocument : function()
245
229
  {
246
- var document = new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument );
247
-
248
- return (
249
- this.getDocument = function()
250
- {
251
- return document;
252
- })();
230
+ return new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument );
253
231
  },
254
232
 
255
- getIndex : function()
233
+ getIndex : function( normalized )
256
234
  {
257
- var $ = this.$;
235
+ // Attention: getAddress depends on this.$
258
236
 
259
- var currentNode = $.parentNode && $.parentNode.firstChild;
260
- var currentIndex = -1;
237
+ var current = this.$,
238
+ index = 0;
261
239
 
262
- while ( currentNode )
240
+ while ( ( current = current.previousSibling ) )
263
241
  {
264
- currentIndex++;
265
-
266
- if ( currentNode == $ )
267
- return currentIndex;
242
+ // When normalizing, do not count it if this is an
243
+ // empty text node or if it's a text node following another one.
244
+ if ( normalized && current.nodeType == 3 &&
245
+ ( !current.nodeValue.length ||
246
+ ( current.previousSibling && current.previousSibling.nodeType == 3 ) ) )
247
+ {
248
+ continue;
249
+ }
268
250
 
269
- currentNode = currentNode.nextSibling;
251
+ index++;
270
252
  }
271
253
 
272
- return -1;
254
+ return index;
273
255
  },
274
256
 
275
257
  getNextSourceNode : function( startFromSibling, nodeType, guard )
@@ -505,11 +487,18 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
505
487
  },
506
488
 
507
489
  /**
508
- * Gets the closes ancestor node of a specified node name.
509
- * @param {String} name Node name of ancestor node.
510
- * @param {Boolean} includeSelf (Optional) Whether to include the current
511
- * node in the calculation or not.
512
- * @returns {CKEDITOR.dom.node} Ancestor node.
490
+ * Gets the closest ancestor node of this node, specified by its node name.
491
+ * @param {String} name The node name of the ancestor node to search.
492
+ * @param {Boolean} [includeSelf] Whether to include the current
493
+ * node in the search.
494
+ * @returns {CKEDITOR.dom.node} The located ancestor node or null if not found.
495
+ * @example
496
+ * // Suppose we have the following HTML:
497
+ * // &lt;div id="outer"&gt;&lt;div id="inner"&gt;&lt;p&gt;&lt;b&gt;Some text&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
498
+ * // If node == &lt;b&gt;
499
+ * ascendant = node.getAscendant( 'div' ); // ascendant == &lt;div id="inner"&gt
500
+ * ascendant = node.getAscendant( 'b' ); // ascendant == null
501
+ * ascendant = node.getAscendant( 'b', true ); // ascendant == &lt;b&gt;
513
502
  */
514
503
  getAscendant : function( name, includeSelf )
515
504
  {
@@ -657,6 +646,45 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype,
657
646
  child.parentNode.removeChild( child ) ;
658
647
  }
659
648
  }
649
+ },
650
+
651
+ /**
652
+ * Checks is this node is read-only (should not be changed). It
653
+ * additionaly returns the element, if any, which defines the read-only
654
+ * state of this node. It may be the node itself or any of its parent
655
+ * nodes.
656
+ * @returns {CKEDITOR.dom.element|Boolean} An element containing
657
+ * read-only attributes or "false" if none is found.
658
+ * @since 3.5
659
+ * @example
660
+ * // For the following HTML:
661
+ * // &lt;div contenteditable="false"&gt;Some &lt;b&gt;text&lt;/b&gt;&lt;/div&gt;
662
+ *
663
+ * // If "ele" is the above &lt;div&gt;
664
+ * ele.isReadOnly(); // the &lt;div&gt; element
665
+ *
666
+ * // If "ele" is the above &lt;b&gt;
667
+ * ele.isReadOnly(); // the &lt;div&gt; element
668
+ */
669
+ isReadOnly : function()
670
+ {
671
+ var current = this;
672
+ while( current )
673
+ {
674
+ if ( current.type == CKEDITOR.NODE_ELEMENT )
675
+ {
676
+ if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) )
677
+ break;
678
+
679
+ if ( current.getAttribute( 'contentEditable' ) == 'false' )
680
+ return current;
681
+ else if ( current.getAttribute( 'contentEditable' ) == 'true' )
682
+ break;
683
+ }
684
+ current = current.getParent();
685
+ }
686
+
687
+ return false;
660
688
  }
661
689
  }
662
690
  );
@@ -1,8 +1,11 @@
1
1
  /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
6
+ /**
7
+ * @class
8
+ */
6
9
  CKEDITOR.dom.nodeList = function( nativeList )
7
10
  {
8
11
  this.$ = nativeList;
@@ -1,16 +1,90 @@
1
1
  /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
2
+ Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3
3
  For licensing, see LICENSE.html or http://ckeditor.com/license
4
4
  */
5
5
 
6
+ /**
7
+ * Creates a CKEDITOR.dom.range instance that can be used inside a specific
8
+ * DOM Document.
9
+ * @class Represents a delimited piece of content in a DOM Document.
10
+ * It is contiguous in the sense that it can be characterized as selecting all
11
+ * of the content between a pair of boundary-points.<br>
12
+ * <br>
13
+ * This class shares much of the W3C
14
+ * <a href="http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html">Document Object Model Range</a>
15
+ * ideas and features, adding several range manipulation tools to it, but it's
16
+ * not intended to be compatible with it.
17
+ * @param {CKEDITOR.dom.document} document The document into which the range
18
+ * features will be available.
19
+ * @example
20
+ * // Create a range for the entire contents of the editor document body.
21
+ * var range = new CKEDITOR.dom.range( editor.document );
22
+ * range.selectNodeContents( editor.document.getBody() );
23
+ * // Delete the contents.
24
+ * range.deleteContents();
25
+ */
6
26
  CKEDITOR.dom.range = function( document )
7
27
  {
28
+ /**
29
+ * Node within which the range begins.
30
+ * @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT}
31
+ * @example
32
+ * var range = new CKEDITOR.dom.range( editor.document );
33
+ * range.selectNodeContents( editor.document.getBody() );
34
+ * alert( range.startContainer.getName() ); // "body"
35
+ */
8
36
  this.startContainer = null;
37
+
38
+ /**
39
+ * Offset within the starting node of the range.
40
+ * @type {Number}
41
+ * @example
42
+ * var range = new CKEDITOR.dom.range( editor.document );
43
+ * range.selectNodeContents( editor.document.getBody() );
44
+ * alert( range.startOffset ); // "0"
45
+ */
9
46
  this.startOffset = null;
47
+
48
+ /**
49
+ * Node within which the range ends.
50
+ * @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT}
51
+ * @example
52
+ * var range = new CKEDITOR.dom.range( editor.document );
53
+ * range.selectNodeContents( editor.document.getBody() );
54
+ * alert( range.endContainer.getName() ); // "body"
55
+ */
10
56
  this.endContainer = null;
57
+
58
+ /**
59
+ * Offset within the ending node of the range.
60
+ * @type {Number}
61
+ * @example
62
+ * var range = new CKEDITOR.dom.range( editor.document );
63
+ * range.selectNodeContents( editor.document.getBody() );
64
+ * alert( range.endOffset ); // == editor.document.getBody().getChildCount()
65
+ */
11
66
  this.endOffset = null;
67
+
68
+ /**
69
+ * Indicates that this is a collapsed range. A collapsed range has it's
70
+ * start and end boudaries at the very same point so nothing is contained
71
+ * in it.
72
+ * @example
73
+ * var range = new CKEDITOR.dom.range( editor.document );
74
+ * range.selectNodeContents( editor.document.getBody() );
75
+ * alert( range.collapsed ); // "false"
76
+ * range.collapse();
77
+ * alert( range.collapsed ); // "true"
78
+ */
12
79
  this.collapsed = true;
13
80
 
81
+ /**
82
+ * The document within which the range can be used.
83
+ * @type {CKEDITOR.dom.document}
84
+ * @example
85
+ * // Selects the body contents of the range document.
86
+ * range.selectNodeContents( range.document.getBody() );
87
+ */
14
88
  this.document = document;
15
89
  };
16
90
 
@@ -29,7 +103,7 @@ CKEDITOR.dom.range = function( document )
29
103
  // This is a shared function used to delete, extract and clone the range
30
104
  // contents.
31
105
  // V2
32
- var execContentsAction = function( range, action, docFrag )
106
+ var execContentsAction = function( range, action, docFrag, mergeThen )
33
107
  {
34
108
  range.optimizeBookmark();
35
109
 
@@ -244,7 +318,17 @@ CKEDITOR.dom.range = function( document )
244
318
  if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode )
245
319
  endIndex--;
246
320
 
247
- range.setStart( topEnd.getParent(), endIndex );
321
+ // Merge splitted parents.
322
+ if ( mergeThen && topStart.type == CKEDITOR.NODE_ELEMENT )
323
+ {
324
+ var span = CKEDITOR.dom.element.createFromHtml( '<span ' +
325
+ 'data-cke-bookmark="1" style="display:none">&nbsp;</span>', range.document );
326
+ span.insertAfter( topStart );
327
+ topStart.mergeSiblings( false );
328
+ range.moveToBookmark( { startNode : span } );
329
+ }
330
+ else
331
+ range.setStart( topEnd.getParent(), endIndex );
248
332
  }
249
333
 
250
334
  // Collapse it to the start.
@@ -275,9 +359,9 @@ CKEDITOR.dom.range = function( document )
275
359
  if ( node.type == CKEDITOR.NODE_TEXT )
276
360
  {
277
361
  // If there's any visible text, then we're not at the start.
278
- if ( CKEDITOR.tools.trim( node.getText() ).length )
362
+ if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length )
279
363
  return false;
280
- }
364
+ }
281
365
  else if ( node.type == CKEDITOR.NODE_ELEMENT )
282
366
  {
283
367
  // If there are non-empty inline elements (e.g. <img />), then we're not
@@ -305,7 +389,7 @@ CKEDITOR.dom.range = function( document )
305
389
  return node.type != CKEDITOR.NODE_TEXT
306
390
  && node.getName() in CKEDITOR.dtd.$removeEmpty
307
391
  || !CKEDITOR.tools.trim( node.getText() )
308
- || node.getParent().hasAttribute( '_fck_bookmark' );
392
+ || !!node.getParent().data( 'cke-bookmark' );
309
393
  }
310
394
 
311
395
  var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(),
@@ -348,7 +432,10 @@ CKEDITOR.dom.range = function( document )
348
432
  this.collapsed = true;
349
433
  },
350
434
 
351
- // The selection may be lost when cloning (due to the splitText() call).
435
+ /**
436
+ * The content nodes of the range are cloned and added to a document fragment, which is returned.
437
+ * <strong> Note: </strong> Text selection may lost after invoking this method. (caused by text node splitting).
438
+ */
352
439
  cloneContents : function()
353
440
  {
354
441
  var docFrag = new CKEDITOR.dom.documentFragment( this.document );
@@ -359,20 +446,29 @@ CKEDITOR.dom.range = function( document )
359
446
  return docFrag;
360
447
  },
361
448
 
362
- deleteContents : function()
449
+ /**
450
+ * Deletes the content nodes of the range permanently from the DOM tree.
451
+ * @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection.
452
+ */
453
+ deleteContents : function( mergeThen )
363
454
  {
364
455
  if ( this.collapsed )
365
456
  return;
366
457
 
367
- execContentsAction( this, 0 );
458
+ execContentsAction( this, 0, null, mergeThen );
368
459
  },
369
460
 
370
- extractContents : function()
461
+ /**
462
+ * The content nodes of the range are cloned and added to a document fragment,
463
+ * meanwhile they're removed permanently from the DOM tree.
464
+ * @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection.
465
+ */
466
+ extractContents : function( mergeThen )
371
467
  {
372
468
  var docFrag = new CKEDITOR.dom.documentFragment( this.document );
373
469
 
374
470
  if ( !this.collapsed )
375
- execContentsAction( this, 1, docFrag );
471
+ execContentsAction( this, 1, docFrag, mergeThen );
376
472
 
377
473
  return docFrag;
378
474
  },
@@ -397,9 +493,10 @@ CKEDITOR.dom.range = function( document )
397
493
  var startNode, endNode;
398
494
  var baseId;
399
495
  var clone;
496
+ var collapsed = this.collapsed;
400
497
 
401
498
  startNode = this.document.createElement( 'span' );
402
- startNode.setAttribute( '_fck_bookmark', 1 );
499
+ startNode.data( 'cke-bookmark', 1 );
403
500
  startNode.setStyle( 'display', 'none' );
404
501
 
405
502
  // For IE, it must have something inside, otherwise it may be
@@ -413,7 +510,7 @@ CKEDITOR.dom.range = function( document )
413
510
  }
414
511
 
415
512
  // If collapsed, the endNode will not be created.
416
- if ( !this.collapsed )
513
+ if ( !collapsed )
417
514
  {
418
515
  endNode = startNode.clone();
419
516
  endNode.setHtml( '&nbsp;' );
@@ -442,7 +539,8 @@ CKEDITOR.dom.range = function( document )
442
539
  return {
443
540
  startNode : serializable ? baseId + 'S' : startNode,
444
541
  endNode : serializable ? baseId + 'E' : endNode,
445
- serializable : serializable
542
+ serializable : serializable,
543
+ collapsed : collapsed
446
544
  };
447
545
  },
448
546
 
@@ -465,6 +563,8 @@ CKEDITOR.dom.range = function( document )
465
563
  var startOffset = this.startOffset,
466
564
  endOffset = this.endOffset;
467
565
 
566
+ var collapsed = this.collapsed;
567
+
468
568
  var child, previous;
469
569
 
470
570
  // If there is no range then get out of here.
@@ -489,6 +589,10 @@ CKEDITOR.dom.range = function( document )
489
589
  startContainer = child;
490
590
  startOffset = 0;
491
591
  }
592
+
593
+ // Get the normalized offset.
594
+ if ( child && child.type == CKEDITOR.NODE_ELEMENT )
595
+ startOffset = child.getIndex( 1 );
492
596
  }
493
597
 
494
598
  // Normalize the start.
@@ -501,7 +605,7 @@ CKEDITOR.dom.range = function( document )
501
605
  }
502
606
 
503
607
  // Process the end only if not normalized.
504
- if ( !this.isCollapsed )
608
+ if ( !collapsed )
505
609
  {
506
610
  // Find out if the start is pointing to a text node that
507
611
  // will be normalized.
@@ -517,6 +621,10 @@ CKEDITOR.dom.range = function( document )
517
621
  endContainer = child;
518
622
  endOffset = 0;
519
623
  }
624
+
625
+ // Get the normalized offset.
626
+ if ( child && child.type == CKEDITOR.NODE_ELEMENT )
627
+ endOffset = child.getIndex( 1 );
520
628
  }
521
629
 
522
630
  // Normalize the end.
@@ -532,10 +640,11 @@ CKEDITOR.dom.range = function( document )
532
640
 
533
641
  return {
534
642
  start : startContainer.getAddress( normalized ),
535
- end : this.isCollapsed ? null : endContainer.getAddress( normalized ),
643
+ end : collapsed ? null : endContainer.getAddress( normalized ),
536
644
  startOffset : startOffset,
537
645
  endOffset : endOffset,
538
646
  normalized : normalized,
647
+ collapsed : collapsed,
539
648
  is2 : true // It's a createBookmark2 bookmark.
540
649
  };
541
650
  },
@@ -697,7 +806,7 @@ CKEDITOR.dom.range = function( document )
697
806
  },
698
807
 
699
808
  /**
700
- * Move the range out of bookmark nodes if they're been the container.
809
+ * Move the range out of bookmark nodes if they'd been the container.
701
810
  */
702
811
  optimizeBookmark: function()
703
812
  {
@@ -705,10 +814,10 @@ CKEDITOR.dom.range = function( document )
705
814
  endNode = this.endContainer;
706
815
 
707
816
  if ( startNode.is && startNode.is( 'span' )
708
- && startNode.hasAttribute( '_fck_bookmark' ) )
817
+ && startNode.data( 'cke-bookmark' ) )
709
818
  this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START );
710
819
  if ( endNode && endNode.is && endNode.is( 'span' )
711
- && endNode.hasAttribute( '_fck_bookmark' ) )
820
+ && endNode.data( 'cke-bookmark' ) )
712
821
  this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END );
713
822
  },
714
823
 
@@ -793,7 +902,12 @@ CKEDITOR.dom.range = function( document )
793
902
  }
794
903
  },
795
904
 
796
- enlarge : function( unit )
905
+ /**
906
+ * Expands the range so that partial units are completely contained.
907
+ * @param unit {Number} The unit type to expand with.
908
+ * @param {Boolean} [excludeBrs=false] Whether include line-breaks when expanding.
909
+ */
910
+ enlarge : function( unit, excludeBrs )
797
911
  {
798
912
  switch ( unit )
799
913
  {
@@ -914,7 +1028,8 @@ CKEDITOR.dom.range = function( document )
914
1028
  // If this is a visible element.
915
1029
  // We need to check for the bookmark attribute because IE insists on
916
1030
  // rendering the display:none nodes we use for bookmarks. (#3363)
917
- if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_fck_bookmark' ) )
1031
+ // Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
1032
+ if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) )
918
1033
  {
919
1034
  // We'll accept it only if we need
920
1035
  // whitespace, and this is an inline
@@ -925,7 +1040,7 @@ CKEDITOR.dom.range = function( document )
925
1040
 
926
1041
  siblingText = sibling.getText();
927
1042
 
928
- if ( !(/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF)
1043
+ if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF)
929
1044
  sibling = null;
930
1045
  else
931
1046
  {
@@ -1073,7 +1188,8 @@ CKEDITOR.dom.range = function( document )
1073
1188
  // If this is a visible element.
1074
1189
  // We need to check for the bookmark attribute because IE insists on
1075
1190
  // rendering the display:none nodes we use for bookmarks. (#3363)
1076
- if ( sibling.$.offsetWidth > 0 && !sibling.getAttribute( '_fck_bookmark' ) )
1191
+ // Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
1192
+ if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) )
1077
1193
  {
1078
1194
  // We'll accept it only if we need
1079
1195
  // whitespace, and this is an inline
@@ -1084,7 +1200,7 @@ CKEDITOR.dom.range = function( document )
1084
1200
 
1085
1201
  siblingText = sibling.getText();
1086
1202
 
1087
- if ( !(/[^\s\ufeff]/).test( siblingText ) )
1203
+ if ( (/[^\s\ufeff]/).test( siblingText ) )
1088
1204
  sibling = null;
1089
1205
  else
1090
1206
  {
@@ -1166,13 +1282,13 @@ CKEDITOR.dom.range = function( document )
1166
1282
 
1167
1283
  var walker = new CKEDITOR.dom.walker( walkerRange ),
1168
1284
  blockBoundary, // The node on which the enlarging should stop.
1169
- tailBr, //
1170
- defaultGuard = CKEDITOR.dom.walker.blockBoundary(
1285
+ tailBr, // In case BR as block boundary.
1286
+ notBlockBoundary = CKEDITOR.dom.walker.blockBoundary(
1171
1287
  ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ),
1172
1288
  // Record the encountered 'blockBoundary' for later use.
1173
1289
  boundaryGuard = function( node )
1174
1290
  {
1175
- var retval = defaultGuard( node );
1291
+ var retval = notBlockBoundary( node );
1176
1292
  if ( !retval )
1177
1293
  blockBoundary = node;
1178
1294
  return retval;
@@ -1193,8 +1309,9 @@ CKEDITOR.dom.range = function( document )
1193
1309
  // It's the body which stop the enlarging if no block boundary found.
1194
1310
  blockBoundary = blockBoundary || body;
1195
1311
 
1196
- // Start the range at different position by comparing
1197
- // the document position of it with 'enlargeable' node.
1312
+ // Start the range either after the end of found block (<p>...</p>[text)
1313
+ // or at the start of block (<p>[text...), by comparing the document position
1314
+ // with 'enlargeable' node.
1198
1315
  this.setStartAt(
1199
1316
  blockBoundary,
1200
1317
  !blockBoundary.is( 'br' ) &&
@@ -1220,8 +1337,8 @@ CKEDITOR.dom.range = function( document )
1220
1337
  // It's the body which stop the enlarging if no block boundary found.
1221
1338
  blockBoundary = blockBoundary || body;
1222
1339
 
1223
- // Start the range at different position by comparing
1224
- // the document position of it with 'enlargeable' node.
1340
+ // Close the range either before the found block start (text]<p>...</p>) or at the block end (...text]</p>)
1341
+ // by comparing the document position with 'enlargeable' node.
1225
1342
  this.setEndAt(
1226
1343
  blockBoundary,
1227
1344
  ( !enlargeable && this.checkEndOfBlock()
@@ -1235,6 +1352,111 @@ CKEDITOR.dom.range = function( document )
1235
1352
  }
1236
1353
  },
1237
1354
 
1355
+ /**
1356
+ * Descrease the range to make sure that boundaries
1357
+ * always anchor beside text nodes or innermost element.
1358
+ * @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode.
1359
+ * <dl>
1360
+ * <dt>CKEDITOR.SHRINK_ELEMENT</dt>
1361
+ * <dd>Shrink the range boundaries to the edge of the innermost element.</dd>
1362
+ * <dt>CKEDITOR.SHRINK_TEXT</dt>
1363
+ * <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>
1364
+ * </dl>
1365
+ * @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node.
1366
+ */
1367
+ shrink : function( mode, selectContents )
1368
+ {
1369
+ // Unable to shrink a collapsed range.
1370
+ if ( !this.collapsed )
1371
+ {
1372
+ mode = mode || CKEDITOR.SHRINK_TEXT;
1373
+
1374
+ var walkerRange = this.clone();
1375
+
1376
+ var startContainer = this.startContainer,
1377
+ endContainer = this.endContainer,
1378
+ startOffset = this.startOffset,
1379
+ endOffset = this.endOffset,
1380
+ collapsed = this.collapsed;
1381
+
1382
+ // Whether the start/end boundary is moveable.
1383
+ var moveStart = 1,
1384
+ moveEnd = 1;
1385
+
1386
+ if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
1387
+ {
1388
+ if ( !startOffset )
1389
+ walkerRange.setStartBefore( startContainer );
1390
+ else if ( startOffset >= startContainer.getLength( ) )
1391
+ walkerRange.setStartAfter( startContainer );
1392
+ else
1393
+ {
1394
+ // Enlarge the range properly to avoid walker making
1395
+ // DOM changes caused by triming the text nodes later.
1396
+ walkerRange.setStartBefore( startContainer );
1397
+ moveStart = 0;
1398
+ }
1399
+ }
1400
+
1401
+ if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
1402
+ {
1403
+ if ( !endOffset )
1404
+ walkerRange.setEndBefore( endContainer );
1405
+ else if ( endOffset >= endContainer.getLength( ) )
1406
+ walkerRange.setEndAfter( endContainer );
1407
+ else
1408
+ {
1409
+ walkerRange.setEndAfter( endContainer );
1410
+ moveEnd = 0;
1411
+ }
1412
+ }
1413
+
1414
+ var walker = new CKEDITOR.dom.walker( walkerRange ),
1415
+ isBookmark = CKEDITOR.dom.walker.bookmark();
1416
+
1417
+ walker.evaluator = function( node )
1418
+ {
1419
+ return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ?
1420
+ CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT );
1421
+ };
1422
+
1423
+ var currentElement;
1424
+ walker.guard = function( node, movingOut )
1425
+ {
1426
+ if ( isBookmark( node ) )
1427
+ return true;
1428
+
1429
+ // Stop when we're shrink in element mode while encountering a text node.
1430
+ if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT )
1431
+ return false;
1432
+
1433
+ // Stop when we've already walked "through" an element.
1434
+ if ( movingOut && node.equals( currentElement ) )
1435
+ return false;
1436
+
1437
+ if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT )
1438
+ currentElement = node;
1439
+
1440
+ return true;
1441
+ };
1442
+
1443
+ if ( moveStart )
1444
+ {
1445
+ var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next']();
1446
+ textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START );
1447
+ }
1448
+
1449
+ if ( moveEnd )
1450
+ {
1451
+ walker.reset();
1452
+ var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous']();
1453
+ textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END );
1454
+ }
1455
+
1456
+ return !!( moveStart || moveEnd );
1457
+ }
1458
+ },
1459
+
1238
1460
  /**
1239
1461
  * Inserts a node at the start of the range. The range will be expanded
1240
1462
  * the contain the node.
@@ -1288,6 +1510,11 @@ CKEDITOR.dom.range = function( document )
1288
1510
  // we will not need this check for our use of this class so we can
1289
1511
  // ignore it for now.
1290
1512
 
1513
+ // Fixing invalid range start inside dtd empty elements.
1514
+ if( startNode.type == CKEDITOR.NODE_ELEMENT
1515
+ && CKEDITOR.dtd.$empty[ startNode.getName() ] )
1516
+ startOffset = startNode.getIndex(), startNode = startNode.getParent();
1517
+
1291
1518
  this.startContainer = startNode;
1292
1519
  this.startOffset = startOffset;
1293
1520
 
@@ -1314,6 +1541,11 @@ CKEDITOR.dom.range = function( document )
1314
1541
  // will not need this check for our use of this class so we can ignore
1315
1542
  // it for now.
1316
1543
 
1544
+ // Fixing invalid range end inside dtd empty elements.
1545
+ if( endNode.type == CKEDITOR.NODE_ELEMENT
1546
+ && CKEDITOR.dtd.$empty[ endNode.getName() ] )
1547
+ endOffset = endNode.getIndex() + 1, endNode = endNode.getParent();
1548
+
1317
1549
  this.endContainer = endNode;
1318
1550
  this.endOffset = endOffset;
1319
1551
 
@@ -1520,26 +1752,36 @@ CKEDITOR.dom.range = function( document )
1520
1752
  },
1521
1753
 
1522
1754
  /**
1523
- * Check whether current range is on the inner edge of the specified element.
1524
- * @param {Number} checkType ( CKEDITOR.START | CKEDITOR.END ) The checking side.
1755
+ * Check whether a range boundary is at the inner boundary of a given
1756
+ * element.
1525
1757
  * @param {CKEDITOR.dom.element} element The target element to check.
1758
+ * @param {Number} checkType The boundary to check for both the range
1759
+ * and the element. It can be CKEDITOR.START or CKEDITOR.END.
1760
+ * @returns {Boolean} "true" if the range boundary is at the inner
1761
+ * boundary of the element.
1526
1762
  */
1527
1763
  checkBoundaryOfElement : function( element, checkType )
1528
1764
  {
1765
+ var checkStart = ( checkType == CKEDITOR.START );
1766
+
1767
+ // Create a copy of this range, so we can manipulate it for our checks.
1529
1768
  var walkerRange = this.clone();
1769
+
1770
+ // Collapse the range at the proper size.
1771
+ walkerRange.collapse( checkStart );
1772
+
1530
1773
  // Expand the range to element boundary.
1531
- walkerRange[ checkType == CKEDITOR.START ?
1532
- 'setStartAt' : 'setEndAt' ]
1533
- ( element, checkType == CKEDITOR.START ?
1534
- CKEDITOR.POSITION_AFTER_START
1535
- : CKEDITOR.POSITION_BEFORE_END );
1774
+ walkerRange[ checkStart ? 'setStartAt' : 'setEndAt' ]
1775
+ ( element, checkStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END );
1536
1776
 
1537
- var walker = new CKEDITOR.dom.walker( walkerRange ),
1538
- retval = false;
1777
+ // Create the walker, which will check if we have anything useful
1778
+ // in the range.
1779
+ var walker = new CKEDITOR.dom.walker( walkerRange );
1539
1780
  walker.evaluator = elementBoundaryEval;
1540
- return walker[ checkType == CKEDITOR.START ?
1541
- 'checkBackward' : 'checkForward' ]();
1781
+
1782
+ return walker[ checkStart ? 'checkBackward' : 'checkForward' ]();
1542
1783
  },
1784
+
1543
1785
  // Calls to this function may produce changes to the DOM. The range may
1544
1786
  // be updated to reflect such changes.
1545
1787
  checkStartOfBlock : function()
@@ -1610,6 +1852,47 @@ CKEDITOR.dom.range = function( document )
1610
1852
  return walker.checkForward();
1611
1853
  },
1612
1854
 
1855
+ /**
1856
+ * Check if elements at which the range boundaries anchor are read-only,
1857
+ * with respect to "contenteditable" attribute.
1858
+ */
1859
+ checkReadOnly : ( function()
1860
+ {
1861
+ function checkNodesEditable( node, anotherEnd )
1862
+ {
1863
+ while( node )
1864
+ {
1865
+ if ( node.type == CKEDITOR.NODE_ELEMENT )
1866
+ {
1867
+ if ( node.getAttribute( 'contentEditable' ) == 'false'
1868
+ && !node.data( 'cke-editable' ) )
1869
+ {
1870
+ return 0;
1871
+ }
1872
+ // Range enclosed entirely in an editable element.
1873
+ else if ( node.is( 'html' )
1874
+ || node.getAttribute( 'contentEditable' ) == 'true'
1875
+ && ( node.contains( anotherEnd ) || node.equals( anotherEnd ) ) )
1876
+ {
1877
+ break;
1878
+ }
1879
+ }
1880
+ node = node.getParent();
1881
+ }
1882
+
1883
+ return 1;
1884
+ }
1885
+
1886
+ return function()
1887
+ {
1888
+ var startNode = this.startContainer,
1889
+ endNode = this.endContainer;
1890
+
1891
+ // Check if elements path at both boundaries are editable.
1892
+ return !( checkNodesEditable( startNode, endNode ) && checkNodesEditable( endNode, startNode ) );
1893
+ };
1894
+ })(),
1895
+
1613
1896
  /**
1614
1897
  * Moves the range boundaries to the first/end editing point inside an
1615
1898
  * element. For example, in an element tree like
@@ -1623,6 +1906,10 @@ CKEDITOR.dom.range = function( document )
1623
1906
  {
1624
1907
  var isEditable;
1625
1908
 
1909
+ // Empty elements are rejected.
1910
+ if ( CKEDITOR.dtd.$empty[ el.getName() ] )
1911
+ return false;
1912
+
1626
1913
  while ( el && el.type == CKEDITOR.NODE_ELEMENT )
1627
1914
  {
1628
1915
  isEditable = el.isEditable();
@@ -1681,8 +1968,15 @@ CKEDITOR.dom.range = function( document )
1681
1968
  */
1682
1969
  getEnclosedNode : function()
1683
1970
  {
1684
- var walkerRange = this.clone(),
1685
- walker = new CKEDITOR.dom.walker( walkerRange ),
1971
+ var walkerRange = this.clone();
1972
+
1973
+ // Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780)
1974
+ walkerRange.optimize();
1975
+ if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT
1976
+ || walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT )
1977
+ return null;
1978
+
1979
+ var walker = new CKEDITOR.dom.walker( walkerRange ),
1686
1980
  isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ),
1687
1981
  isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
1688
1982
  evaluator = function( node )
@@ -1726,10 +2020,13 @@ CKEDITOR.ENLARGE_ELEMENT = 1;
1726
2020
  CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2;
1727
2021
  CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3;
1728
2022
 
1729
- /**
1730
- * Check boundary types.
1731
- * @see CKEDITOR.dom.range::checkBoundaryOfElement
1732
- */
2023
+ // Check boundary types.
2024
+ // @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement
1733
2025
  CKEDITOR.START = 1;
1734
2026
  CKEDITOR.END = 2;
1735
2027
  CKEDITOR.STARTEND = 3;
2028
+
2029
+ // Shrink range types.
2030
+ // @see CKEDITOR.dom.range.prototype.shrink
2031
+ CKEDITOR.SHRINK_ELEMENT = 1;
2032
+ CKEDITOR.SHRINK_TEXT = 2;