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,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
 
@@ -9,8 +9,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
9
9
 
10
10
  (function()
11
11
  {
12
- var alignRemoveRegex = /(-moz-|-webkit-|start|auto)/i;
13
-
14
12
  function getState( editor, path )
15
13
  {
16
14
  var firstBlock = path.block || path.blockLimit;
@@ -18,14 +16,42 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
18
16
  if ( !firstBlock || firstBlock.getName() == 'body' )
19
17
  return CKEDITOR.TRISTATE_OFF;
20
18
 
21
- var currentAlign = firstBlock.getComputedStyle( 'text-align' ).replace( alignRemoveRegex, '' );
22
- if ( ( !currentAlign && this.isDefaultAlign ) || currentAlign == this.value )
23
- return CKEDITOR.TRISTATE_ON;
24
- return CKEDITOR.TRISTATE_OFF;
19
+ return ( getAlignment( firstBlock, editor.config.useComputedState ) == this.value ) ?
20
+ CKEDITOR.TRISTATE_ON :
21
+ CKEDITOR.TRISTATE_OFF;
22
+ }
23
+
24
+ function getAlignment( element, useComputedState )
25
+ {
26
+ useComputedState = useComputedState === undefined || useComputedState;
27
+
28
+ var align;
29
+ if ( useComputedState )
30
+ align = element.getComputedStyle( 'text-align' );
31
+ else
32
+ {
33
+ while ( !element.hasAttribute || !( element.hasAttribute( 'align' ) || element.getStyle( 'text-align' ) ) )
34
+ {
35
+ var parent = element.getParent();
36
+ if ( !parent )
37
+ break;
38
+ element = parent;
39
+ }
40
+ align = element.getStyle( 'text-align' ) || element.getAttribute( 'align' ) || '';
41
+ }
42
+
43
+ align && ( align = align.replace( /-moz-|-webkit-|start|auto/i, '' ) );
44
+
45
+ !align && useComputedState && ( align = element.getComputedStyle( 'direction' ) == 'rtl' ? 'right' : 'left' );
46
+
47
+ return align;
25
48
  }
26
49
 
27
50
  function onSelectionChange( evt )
28
51
  {
52
+ if ( evt.editor.readOnly )
53
+ return;
54
+
29
55
  var command = evt.editor.getCommand( this.name );
30
56
  command.state = getState.call( this, evt.editor, evt.data.path );
31
57
  command.fire( 'state' );
@@ -36,10 +62,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
36
62
  this.name = name;
37
63
  this.value = value;
38
64
 
39
- var contentDir = editor.config.contentsLangDirection;
40
- this.isDefaultAlign = ( value == 'left' && contentDir == 'ltr' ) ||
41
- ( value == 'right' && contentDir == 'rtl' );
42
-
43
65
  var classes = editor.config.justifyClasses;
44
66
  if ( classes )
45
67
  {
@@ -63,6 +85,59 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
63
85
  }
64
86
  }
65
87
 
88
+ function onDirChanged( e )
89
+ {
90
+ var editor = e.editor;
91
+
92
+ var range = new CKEDITOR.dom.range( editor.document );
93
+ range.setStartBefore( e.data.node );
94
+ range.setEndAfter( e.data.node );
95
+
96
+ var walker = new CKEDITOR.dom.walker( range ),
97
+ node;
98
+
99
+ while ( ( node = walker.next() ) )
100
+ {
101
+ if ( node.type == CKEDITOR.NODE_ELEMENT )
102
+ {
103
+ // A child with the defined dir is to be ignored.
104
+ if ( !node.equals( e.data.node ) && node.getDirection() )
105
+ {
106
+ range.setStartAfter( node );
107
+ walker = new CKEDITOR.dom.walker( range );
108
+ continue;
109
+ }
110
+
111
+ // Switch the alignment.
112
+ var classes = editor.config.justifyClasses;
113
+ if ( classes )
114
+ {
115
+ // The left align class.
116
+ if ( node.hasClass( classes[ 0 ] ) )
117
+ {
118
+ node.removeClass( classes[ 0 ] );
119
+ node.addClass( classes[ 2 ] );
120
+ }
121
+ // The right align class.
122
+ else if ( node.hasClass( classes[ 2 ] ) )
123
+ {
124
+ node.removeClass( classes[ 2 ] );
125
+ node.addClass( classes[ 0 ] );
126
+ }
127
+ }
128
+
129
+ // Always switch CSS margins.
130
+ var style = 'text-align';
131
+ var align = node.getStyle( style );
132
+
133
+ if ( align == 'left' )
134
+ node.setStyle( style, 'right' );
135
+ else if ( align == 'right' )
136
+ node.setStyle( style, 'left' );
137
+ }
138
+ }
139
+ }
140
+
66
141
  justifyCommand.prototype = {
67
142
  exec : function( editor )
68
143
  {
@@ -73,40 +148,43 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
73
148
  return;
74
149
 
75
150
  var bookmarks = selection.createBookmarks(),
76
- ranges = selection.getRanges();
77
-
151
+ ranges = selection.getRanges( true );
78
152
 
79
153
  var cssClassName = this.cssClassName,
80
154
  iterator,
81
155
  block;
156
+
157
+ var useComputedState = editor.config.useComputedState;
158
+ useComputedState = useComputedState === undefined || useComputedState;
159
+
82
160
  for ( var i = ranges.length - 1 ; i >= 0 ; i-- )
83
161
  {
84
162
  iterator = ranges[ i ].createIterator();
85
163
  iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR;
86
164
 
87
- while ( ( block = iterator.getNextParagraph() ) )
165
+ while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) )
88
166
  {
89
167
  block.removeAttribute( 'align' );
168
+ block.removeStyle( 'text-align' );
169
+
170
+ // Remove any of the alignment classes from the className.
171
+ var className = cssClassName && ( block.$.className =
172
+ CKEDITOR.tools.ltrim( block.$.className.replace( this.cssClassRegex, '' ) ) );
173
+
174
+ var apply =
175
+ ( this.state == CKEDITOR.TRISTATE_OFF ) &&
176
+ ( !useComputedState || ( getAlignment( block, true ) != this.value ) );
90
177
 
91
178
  if ( cssClassName )
92
179
  {
93
- // Remove any of the alignment classes from the className.
94
- var className = block.$.className =
95
- CKEDITOR.tools.ltrim( block.$.className.replace( this.cssClassRegex, '' ) );
96
-
97
180
  // Append the desired class name.
98
- if ( this.state == CKEDITOR.TRISTATE_OFF && !this.isDefaultAlign )
181
+ if ( apply )
99
182
  block.addClass( cssClassName );
100
183
  else if ( !className )
101
184
  block.removeAttribute( 'class' );
102
185
  }
103
- else
104
- {
105
- if ( this.state == CKEDITOR.TRISTATE_OFF && !this.isDefaultAlign )
106
- block.setStyle( 'text-align', this.value );
107
- else
108
- block.removeStyle( 'text-align' );
109
- }
186
+ else if ( apply )
187
+ block.setStyle( 'text-align', this.value );
110
188
  }
111
189
 
112
190
  }
@@ -156,13 +234,20 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
156
234
  editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, right ) );
157
235
  editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, center ) );
158
236
  editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, justify ) );
237
+ editor.on( 'dirChanged', onDirChanged );
159
238
  },
160
239
 
161
240
  requires : [ 'domiterator' ]
162
241
  });
163
242
  })();
164
243
 
165
- CKEDITOR.tools.extend( CKEDITOR.config,
166
- {
167
- justifyClasses : null
168
- } );
244
+ /**
245
+ * List of classes to use for aligning the contents. If it's null, no classes will be used
246
+ * and instead the corresponding CSS values will be used. The array should contain 4 members, in the following order: left, center, right, justify.
247
+ * @name CKEDITOR.config.justifyClasses
248
+ * @type Array
249
+ * @default null
250
+ * @example
251
+ * // Use the classes 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify'
252
+ * config.justifyClasses = [ 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' ];
253
+ */
@@ -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
 
@@ -28,14 +28,10 @@ CKEDITOR.plugins.add( 'keystrokes',
28
28
  blockedKeystrokes = editor.keystrokeHandler.blockedKeystrokes;
29
29
 
30
30
  for ( var i = 0 ; i < keystrokesConfig.length ; i++ )
31
- {
32
31
  keystrokes[ keystrokesConfig[i][0] ] = keystrokesConfig[i][1];
33
- }
34
32
 
35
33
  for ( i = 0 ; i < blockedConfig.length ; i++ )
36
- {
37
34
  blockedKeystrokes[ blockedConfig[i] ] = 1;
38
- }
39
35
  }
40
36
  });
41
37
 
@@ -214,13 +210,13 @@ CKEDITOR.config.keystrokes =
214
210
  [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ],
215
211
  [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ],
216
212
 
217
- [ CKEDITOR.ALT + 109 /*-*/, 'toolbarCollapse' ],
213
+ [ CKEDITOR.ALT + ( CKEDITOR.env.ie || CKEDITOR.env.webkit ? 189 : 109 ) /*-*/, 'toolbarCollapse' ],
218
214
  [ CKEDITOR.ALT + 48 /*0*/, 'a11yHelp' ]
219
215
  ];
220
216
 
221
217
  /**
222
218
  * Fired when any keyboard key (or combination) is pressed into the editing area.
223
- * @name CKEDITOR#key
219
+ * @name CKEDITOR.editor#key
224
220
  * @event
225
221
  * @param {Number} data.keyCode A number representing the key code (or
226
222
  * combination). It is the sum of the current key code and the
@@ -1,73 +1,118 @@
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
  CKEDITOR.dialog.add( 'anchor', function( editor )
7
7
  {
8
8
  // Function called in onShow to load selected element.
9
- var loadElements = function( editor, selection, element )
9
+ var loadElements = function( element )
10
10
  {
11
- this.editMode = true;
12
- this.editObj = element;
11
+ this._.selectedElement = element;
13
12
 
14
- var attributeValue = this.editObj.getAttribute( 'name' );
15
- if ( attributeValue )
16
- this.setValueOf( 'info','txtName', attributeValue );
17
- else
18
- this.setValueOf( 'info','txtName', "" );
13
+ var attributeValue = element.data( 'cke-saved-name' );
14
+ this.setValueOf( 'info','txtName', attributeValue || '' );
19
15
  };
20
16
 
17
+ function createFakeAnchor( editor, anchor )
18
+ {
19
+ return editor.createFakeElement( anchor, 'cke_anchor', 'anchor' );
20
+ }
21
+
21
22
  return {
22
23
  title : editor.lang.anchor.title,
23
24
  minWidth : 300,
24
25
  minHeight : 60,
25
26
  onOk : function()
26
27
  {
27
- // Always create a new anchor, because of IE BUG.
28
- var name = this.getValueOf( 'info', 'txtName' ),
29
- element = CKEDITOR.env.ie ?
30
- editor.document.createElement( '<a name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) :
31
- editor.document.createElement( 'a' );
28
+ var name = this.getValueOf( 'info', 'txtName' );
29
+ var attributes =
30
+ {
31
+ name : name,
32
+ 'data-cke-saved-name' : name
33
+ };
32
34
 
33
- // Move contents and attributes of old anchor to new anchor.
34
- if ( this.editMode )
35
+ if ( this._.selectedElement )
35
36
  {
36
- this.editObj.copyAttributes( element, { name : 1 } );
37
- this.editObj.moveChildren( element );
37
+ if ( this._.selectedElement.data( 'cke-realelement' ) )
38
+ {
39
+ var newFake = createFakeAnchor( editor, editor.document.createElement( 'a', { attributes: attributes } ) );
40
+ newFake.replace( this._.selectedElement );
41
+ }
42
+ else
43
+ this._.selectedElement.setAttributes( attributes );
38
44
  }
39
-
40
- // Set name.
41
- element.removeAttribute( '_cke_saved_name' );
42
- element.setAttribute( 'name', name );
43
-
44
- // Insert a new anchor.
45
- var fakeElement = editor.createFakeElement( element, 'cke_anchor', 'anchor' );
46
- if ( !this.editMode )
47
- editor.insertElement( fakeElement );
48
45
  else
49
46
  {
50
- fakeElement.replace( this.fakeObj );
51
- editor.getSelection().selectElement( fakeElement );
47
+ var sel = editor.getSelection(),
48
+ range = sel && sel.getRanges()[ 0 ];
49
+
50
+ // Empty anchor
51
+ if ( range.collapsed )
52
+ {
53
+ if ( CKEDITOR.plugins.link.synAnchorSelector )
54
+ attributes[ 'class' ] = 'cke_anchor_empty';
55
+
56
+ if ( CKEDITOR.plugins.link.emptyAnchorFix )
57
+ {
58
+ attributes[ 'contenteditable' ] = 'false';
59
+ attributes[ 'data-cke-editable' ] = 1;
60
+ }
61
+
62
+ var anchor = editor.document.createElement( 'a', { attributes: attributes } );
63
+
64
+ // Transform the anchor into a fake element for browsers that need it.
65
+ if ( CKEDITOR.plugins.link.fakeAnchor )
66
+ anchor = createFakeAnchor( editor, anchor );
67
+
68
+ range.insertNode( anchor );
69
+ }
70
+ else
71
+ {
72
+ if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
73
+ attributes['class'] = 'cke_anchor';
74
+
75
+ // Apply style.
76
+ var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
77
+ style.type = CKEDITOR.STYLE_INLINE;
78
+ style.apply( editor.document );
79
+ }
52
80
  }
81
+ },
53
82
 
54
- return true;
83
+ onHide : function()
84
+ {
85
+ delete this._.selectedElement;
55
86
  },
87
+
56
88
  onShow : function()
57
89
  {
58
- this.editObj = false;
59
- this.fakeObj = false;
60
- this.editMode = false;
90
+ var selection = editor.getSelection(),
91
+ fullySelected = selection.getSelectedElement(),
92
+ partialSelected;
61
93
 
62
- var selection = editor.getSelection();
63
- var element = selection.getSelectedElement();
64
- if ( element && element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' )
94
+ // Detect the anchor under selection.
95
+ if ( fullySelected )
65
96
  {
66
- this.fakeObj = element;
67
- element = editor.restoreRealElement( this.fakeObj );
68
- loadElements.apply( this, [ editor, selection, element ] );
69
- selection.selectElement( this.fakeObj );
97
+ if ( CKEDITOR.plugins.link.fakeAnchor )
98
+ {
99
+ var realElement = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, fullySelected );
100
+ realElement && loadElements.call( this, realElement );
101
+ this._.selectedElement = fullySelected;
102
+ }
103
+ else if ( fullySelected.is( 'a' ) && fullySelected.hasAttribute( 'name' ) )
104
+ loadElements.call( this, fullySelected );
70
105
  }
106
+ else
107
+ {
108
+ partialSelected = CKEDITOR.plugins.link.getSelectedLink( editor );
109
+ if ( partialSelected )
110
+ {
111
+ loadElements.call( this, partialSelected );
112
+ selection.selectElement( partialSelected );
113
+ }
114
+ }
115
+
71
116
  this.getContentElement( 'info', 'txtName' ).focus();
72
117
  },
73
118
  contents : [
@@ -1,10 +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
6
  CKEDITOR.dialog.add( 'link', function( editor )
7
7
  {
8
+ var plugin = CKEDITOR.plugins.link;
8
9
  // Handles the event when the "Target" selection box is changed.
9
10
  var targetChanged = function()
10
11
  {
@@ -74,6 +75,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
74
75
  else
75
76
  element.hide();
76
77
  }
78
+
79
+ dialog.layout();
77
80
  };
78
81
 
79
82
  // Loads the parameters in a selected link to the link dialog fields.
@@ -93,7 +96,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
93
96
 
94
97
  var parseLink = function( editor, element )
95
98
  {
96
- var href = element ? ( element.getAttribute( '_cke_saved_href' ) || element.getAttribute( 'href' ) ) : '',
99
+ var href = ( element && ( element.data( 'cke-saved-href' ) || element.getAttribute( 'href' ) ) ) || '',
97
100
  javascriptMatch,
98
101
  emailMatch,
99
102
  anchorMatch,
@@ -183,7 +186,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
183
186
  // IE BUG: target attribute is an empty string instead of null in IE if it's not set.
184
187
  if ( !target )
185
188
  {
186
- var onclick = element.getAttribute( '_cke_pa_onclick' ) || element.getAttribute( 'onclick' ),
189
+ var onclick = element.data( 'cke-pa-onclick' ) || element.getAttribute( 'onclick' ),
187
190
  onclickMatch = onclick && onclick.match( popupRegex );
188
191
  if ( onclickMatch )
189
192
  {
@@ -193,7 +196,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
193
196
  var featureMatch;
194
197
  while ( ( featureMatch = popupFeaturesRegex.exec( onclickMatch[2] ) ) )
195
198
  {
196
- if ( featureMatch[2] == 'yes' || featureMatch[2] == '1' )
199
+ // Some values should remain numbers (#7300)
200
+ if ( ( featureMatch[2] == 'yes' || featureMatch[2] == '1' ) && !( featureMatch[1] in { height:1, width:1, top:1, left:1 } ) )
197
201
  retval.target[ featureMatch[1] ] = true;
198
202
  else if ( isFinite( featureMatch[2] ) )
199
203
  retval.target[ featureMatch[1] ] = featureMatch[2];
@@ -222,43 +226,36 @@ CKEDITOR.dialog.add( 'link', function( editor )
222
226
  advAttr( 'advId', 'id' );
223
227
  advAttr( 'advLangDir', 'dir' );
224
228
  advAttr( 'advAccessKey', 'accessKey' );
225
- advAttr( 'advName', 'name' );
229
+
230
+ retval.adv.advName =
231
+ element.data( 'cke-saved-name' )
232
+ || element.getAttribute( 'name' )
233
+ || '';
226
234
  advAttr( 'advLangCode', 'lang' );
227
235
  advAttr( 'advTabIndex', 'tabindex' );
228
236
  advAttr( 'advTitle', 'title' );
229
237
  advAttr( 'advContentType', 'type' );
230
- advAttr( 'advCSSClasses', 'class' );
238
+ CKEDITOR.plugins.link.synAnchorSelector ?
239
+ retval.adv.advCSSClasses = getLinkClass( element )
240
+ : advAttr( 'advCSSClasses', 'class' );
231
241
  advAttr( 'advCharset', 'charset' );
232
242
  advAttr( 'advStyles', 'style' );
243
+ advAttr( 'advRel', 'rel' );
233
244
  }
234
245
 
235
246
  // Find out whether we have any anchors in the editor.
236
- // Get all IMG elements in CK document.
237
- var elements = editor.document.getElementsByTag( 'img' ),
238
- realAnchors = new CKEDITOR.dom.nodeList( editor.document.$.anchors ),
239
- anchors = retval.anchors = [];
240
-
241
- for ( var i = 0; i < elements.count() ; i++ )
242
- {
243
- var item = elements.getItem( i );
244
- if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )
245
- {
246
- anchors.push( editor.restoreRealElement( item ) );
247
- }
248
- }
249
-
250
- for ( i = 0 ; i < realAnchors.count() ; i++ )
251
- anchors.push( realAnchors.getItem( i ) );
247
+ var anchorList = new CKEDITOR.dom.nodeList( editor.document.$.anchors ),
248
+ anchors = retval.anchors = [],
249
+ item;
252
250
 
253
- for ( i = 0 ; i < anchors.length ; i++ )
251
+ for ( var i = 0, count = anchorList.count(); i < count; i++ )
254
252
  {
255
- item = anchors[ i ];
253
+ item = anchorList.getItem( i );
256
254
  anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };
257
255
  }
258
256
 
259
257
  // Record down the selected element in the dialog.
260
258
  this._.selectedElement = element;
261
-
262
259
  return retval;
263
260
  };
264
261
 
@@ -362,27 +359,36 @@ CKEDITOR.dialog.add( 'link', function( editor )
362
359
  return 'String.fromCharCode(' + encodedChars.join( ',' ) + ')';
363
360
  }
364
361
 
362
+ function getLinkClass( ele )
363
+ {
364
+ var className = ele.getAttribute( 'class' );
365
+ return className ? className.replace( /\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g, '' ) : '';
366
+ }
367
+
368
+ var commonLang = editor.lang.common,
369
+ linkLang = editor.lang.link;
370
+
365
371
  return {
366
- title : editor.lang.link.title,
372
+ title : linkLang.title,
367
373
  minWidth : 350,
368
374
  minHeight : 230,
369
375
  contents : [
370
376
  {
371
377
  id : 'info',
372
- label : editor.lang.link.info,
373
- title : editor.lang.link.info,
378
+ label : linkLang.info,
379
+ title : linkLang.info,
374
380
  elements :
375
381
  [
376
382
  {
377
383
  id : 'linkType',
378
384
  type : 'select',
379
- label : editor.lang.link.type,
385
+ label : linkLang.type,
380
386
  'default' : 'url',
381
387
  items :
382
388
  [
383
- [ editor.lang.link.toUrl, 'url' ],
384
- [ editor.lang.link.toAnchor, 'anchor' ],
385
- [ editor.lang.link.toEmail, 'email' ]
389
+ [ linkLang.toUrl, 'url' ],
390
+ [ linkLang.toAnchor, 'anchor' ],
391
+ [ linkLang.toEmail, 'email' ]
386
392
  ],
387
393
  onChange : linkTypeChanged,
388
394
  setup : function( data )
@@ -408,16 +414,16 @@ CKEDITOR.dialog.add( 'link', function( editor )
408
414
  {
409
415
  id : 'protocol',
410
416
  type : 'select',
411
- label : editor.lang.common.protocol,
417
+ label : commonLang.protocol,
412
418
  'default' : 'http://',
413
- style : 'width : 100%;',
414
419
  items :
415
420
  [
416
- [ 'http://' ],
417
- [ 'https://' ],
418
- [ 'ftp://' ],
419
- [ 'news://' ],
420
- [ '<other>', '' ]
421
+ // Force 'ltr' for protocol names in BIDI. (#5433)
422
+ [ 'http://\u200E', 'http://' ],
423
+ [ 'https://\u200E', 'https://' ],
424
+ [ 'ftp://\u200E', 'ftp://' ],
425
+ [ 'news://\u200E', 'news://' ],
426
+ [ linkLang.other , '' ]
421
427
  ],
422
428
  setup : function( data )
423
429
  {
@@ -435,7 +441,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
435
441
  {
436
442
  type : 'text',
437
443
  id : 'url',
438
- label : editor.lang.common.url,
444
+ label : commonLang.url,
439
445
  required: true,
440
446
  onLoad : function ()
441
447
  {
@@ -446,8 +452,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
446
452
  this.allowOnChange = false;
447
453
  var protocolCmb = this.getDialog().getContentElement( 'info', 'protocol' ),
448
454
  url = this.getValue(),
449
- urlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/gi,
450
- urlOnChangeTestOther = /^((javascript:)|[#\/\.])/gi;
455
+ urlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/i,
456
+ urlOnChangeTestOther = /^((javascript:)|[#\/\.\?])/i;
451
457
 
452
458
  var protocol = urlOnChangeProtocol.exec( url );
453
459
  if ( protocol )
@@ -476,7 +482,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
476
482
  if ( this.getDialog().fakeObj ) // Edit Anchor.
477
483
  return true;
478
484
 
479
- var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noUrl );
485
+ var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noUrl );
480
486
  return func.apply( this );
481
487
  },
482
488
  setup : function( data )
@@ -512,7 +518,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
512
518
  id : 'browse',
513
519
  hidden : 'true',
514
520
  filebrowser : 'info:url',
515
- label : editor.lang.common.browseServer
521
+ label : commonLang.browseServer
516
522
  }
517
523
  ]
518
524
  },
@@ -527,7 +533,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
527
533
  {
528
534
  type : 'fieldset',
529
535
  id : 'selectAnchorText',
530
- label : editor.lang.link.selectAnchor,
536
+ label : linkLang.selectAnchor,
531
537
  setup : function( data )
532
538
  {
533
539
  if ( data.anchors.length > 0 )
@@ -546,7 +552,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
546
552
  type : 'select',
547
553
  id : 'anchorName',
548
554
  'default' : '',
549
- label : editor.lang.link.anchorName,
555
+ label : linkLang.anchorName,
550
556
  style : 'width: 100%;',
551
557
  items :
552
558
  [
@@ -581,7 +587,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
581
587
  type : 'select',
582
588
  id : 'anchorId',
583
589
  'default' : '',
584
- label : editor.lang.link.anchorId,
590
+ label : linkLang.anchorId,
585
591
  style : 'width: 100%;',
586
592
  items :
587
593
  [
@@ -623,7 +629,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
623
629
  type : 'html',
624
630
  id : 'noAnchors',
625
631
  style : 'text-align: center;',
626
- html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( editor.lang.link.noAnchors ) + '</div>',
632
+ html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( linkLang.noAnchors ) + '</div>',
627
633
  // Focus the first element defined in above html.
628
634
  focus : true,
629
635
  setup : function( data )
@@ -650,7 +656,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
650
656
  {
651
657
  type : 'text',
652
658
  id : 'emailAddress',
653
- label : editor.lang.link.emailAddress,
659
+ label : linkLang.emailAddress,
654
660
  required : true,
655
661
  validate : function()
656
662
  {
@@ -660,7 +666,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
660
666
  dialog.getValueOf( 'info', 'linkType' ) != 'email' )
661
667
  return true;
662
668
 
663
- var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noEmail );
669
+ var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noEmail );
664
670
  return func.apply( this );
665
671
  },
666
672
  setup : function( data )
@@ -683,7 +689,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
683
689
  {
684
690
  type : 'text',
685
691
  id : 'emailSubject',
686
- label : editor.lang.link.emailSubject,
692
+ label : linkLang.emailSubject,
687
693
  setup : function( data )
688
694
  {
689
695
  if ( data.email )
@@ -700,7 +706,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
700
706
  {
701
707
  type : 'textarea',
702
708
  id : 'emailBody',
703
- label : editor.lang.link.emailBody,
709
+ label : linkLang.emailBody,
704
710
  rows : 3,
705
711
  'default' : '',
706
712
  setup : function( data )
@@ -727,8 +733,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
727
733
  },
728
734
  {
729
735
  id : 'target',
730
- label : editor.lang.link.target,
731
- title : editor.lang.link.target,
736
+ label : linkLang.target,
737
+ title : linkLang.target,
732
738
  elements :
733
739
  [
734
740
  {
@@ -739,24 +745,25 @@ CKEDITOR.dialog.add( 'link', function( editor )
739
745
  {
740
746
  type : 'select',
741
747
  id : 'linkTargetType',
742
- label : editor.lang.common.target,
748
+ label : commonLang.target,
743
749
  'default' : 'notSet',
744
750
  style : 'width : 100%;',
745
751
  'items' :
746
752
  [
747
- [ editor.lang.common.notSet, 'notSet' ],
748
- [ editor.lang.link.targetFrame, 'frame' ],
749
- [ editor.lang.link.targetPopup, 'popup' ],
750
- [ editor.lang.common.targetNew, '_blank' ],
751
- [ editor.lang.common.targetTop, '_top' ],
752
- [ editor.lang.common.targetSelf, '_self' ],
753
- [ editor.lang.common.targetParent, '_parent' ]
753
+ [ commonLang.notSet, 'notSet' ],
754
+ [ linkLang.targetFrame, 'frame' ],
755
+ [ linkLang.targetPopup, 'popup' ],
756
+ [ commonLang.targetNew, '_blank' ],
757
+ [ commonLang.targetTop, '_top' ],
758
+ [ commonLang.targetSelf, '_self' ],
759
+ [ commonLang.targetParent, '_parent' ]
754
760
  ],
755
761
  onChange : targetChanged,
756
762
  setup : function( data )
757
763
  {
758
764
  if ( data.target )
759
- this.setValue( data.target.type );
765
+ this.setValue( data.target.type || 'notSet' );
766
+ targetChanged.call( this );
760
767
  },
761
768
  commit : function( data )
762
769
  {
@@ -769,7 +776,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
769
776
  {
770
777
  type : 'text',
771
778
  id : 'linkTargetName',
772
- label : editor.lang.link.targetFrameName,
779
+ label : linkLang.targetFrameName,
773
780
  'default' : '',
774
781
  setup : function( data )
775
782
  {
@@ -781,14 +788,14 @@ CKEDITOR.dialog.add( 'link', function( editor )
781
788
  if ( !data.target )
782
789
  data.target = {};
783
790
 
784
- data.target.name = this.getValue();
791
+ data.target.name = this.getValue().replace(/\W/gi, '');
785
792
  }
786
793
  }
787
794
  ]
788
795
  },
789
796
  {
790
797
  type : 'vbox',
791
- width : 260,
798
+ width : '100%',
792
799
  align : 'center',
793
800
  padding : 2,
794
801
  id : 'popupFeatures',
@@ -796,7 +803,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
796
803
  [
797
804
  {
798
805
  type : 'fieldset',
799
- label : editor.lang.link.popupFeatures,
806
+ label : linkLang.popupFeatures,
800
807
  children :
801
808
  [
802
809
  {
@@ -806,14 +813,14 @@ CKEDITOR.dialog.add( 'link', function( editor )
806
813
  {
807
814
  type : 'checkbox',
808
815
  id : 'resizable',
809
- label : editor.lang.link.popupResizable,
816
+ label : linkLang.popupResizable,
810
817
  setup : setupPopupParams,
811
818
  commit : commitPopupParams
812
819
  },
813
820
  {
814
821
  type : 'checkbox',
815
822
  id : 'status',
816
- label : editor.lang.link.popupStatusBar,
823
+ label : linkLang.popupStatusBar,
817
824
  setup : setupPopupParams,
818
825
  commit : commitPopupParams
819
826
 
@@ -827,7 +834,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
827
834
  {
828
835
  type : 'checkbox',
829
836
  id : 'location',
830
- label : editor.lang.link.popupLocationBar,
837
+ label : linkLang.popupLocationBar,
831
838
  setup : setupPopupParams,
832
839
  commit : commitPopupParams
833
840
 
@@ -835,7 +842,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
835
842
  {
836
843
  type : 'checkbox',
837
844
  id : 'toolbar',
838
- label : editor.lang.link.popupToolbar,
845
+ label : linkLang.popupToolbar,
839
846
  setup : setupPopupParams,
840
847
  commit : commitPopupParams
841
848
 
@@ -849,7 +856,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
849
856
  {
850
857
  type : 'checkbox',
851
858
  id : 'menubar',
852
- label : editor.lang.link.popupMenuBar,
859
+ label : linkLang.popupMenuBar,
853
860
  setup : setupPopupParams,
854
861
  commit : commitPopupParams
855
862
 
@@ -857,7 +864,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
857
864
  {
858
865
  type : 'checkbox',
859
866
  id : 'fullscreen',
860
- label : editor.lang.link.popupFullScreen,
867
+ label : linkLang.popupFullScreen,
861
868
  setup : setupPopupParams,
862
869
  commit : commitPopupParams
863
870
 
@@ -871,7 +878,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
871
878
  {
872
879
  type : 'checkbox',
873
880
  id : 'scrollbars',
874
- label : editor.lang.link.popupScrollBars,
881
+ label : linkLang.popupScrollBars,
875
882
  setup : setupPopupParams,
876
883
  commit : commitPopupParams
877
884
 
@@ -879,7 +886,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
879
886
  {
880
887
  type : 'checkbox',
881
888
  id : 'dependent',
882
- label : editor.lang.link.popupDependent,
889
+ label : linkLang.popupDependent,
883
890
  setup : setupPopupParams,
884
891
  commit : commitPopupParams
885
892
 
@@ -892,9 +899,9 @@ CKEDITOR.dialog.add( 'link', function( editor )
892
899
  [
893
900
  {
894
901
  type : 'text',
895
- widths : [ '30%', '70%' ],
902
+ widths : [ '50%', '50%' ],
896
903
  labelLayout : 'horizontal',
897
- label : editor.lang.link.popupWidth,
904
+ label : commonLang.width,
898
905
  id : 'width',
899
906
  setup : setupPopupParams,
900
907
  commit : commitPopupParams
@@ -903,8 +910,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
903
910
  {
904
911
  type : 'text',
905
912
  labelLayout : 'horizontal',
906
- widths : [ '55%', '45%' ],
907
- label : editor.lang.link.popupLeft,
913
+ widths : [ '50%', '50%' ],
914
+ label : linkLang.popupLeft,
908
915
  id : 'left',
909
916
  setup : setupPopupParams,
910
917
  commit : commitPopupParams
@@ -919,8 +926,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
919
926
  {
920
927
  type : 'text',
921
928
  labelLayout : 'horizontal',
922
- widths : [ '30%', '70%' ],
923
- label : editor.lang.link.popupHeight,
929
+ widths : [ '50%', '50%' ],
930
+ label : commonLang.height,
924
931
  id : 'height',
925
932
  setup : setupPopupParams,
926
933
  commit : commitPopupParams
@@ -929,8 +936,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
929
936
  {
930
937
  type : 'text',
931
938
  labelLayout : 'horizontal',
932
- label : editor.lang.link.popupTop,
933
- widths : [ '55%', '45%' ],
939
+ label : linkLang.popupTop,
940
+ widths : [ '50%', '50%' ],
934
941
  id : 'top',
935
942
  setup : setupPopupParams,
936
943
  commit : commitPopupParams
@@ -946,8 +953,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
946
953
  },
947
954
  {
948
955
  id : 'upload',
949
- label : editor.lang.link.upload,
950
- title : editor.lang.link.upload,
956
+ label : linkLang.upload,
957
+ title : linkLang.upload,
951
958
  hidden : true,
952
959
  filebrowser : 'uploadButton',
953
960
  elements :
@@ -955,14 +962,14 @@ CKEDITOR.dialog.add( 'link', function( editor )
955
962
  {
956
963
  type : 'file',
957
964
  id : 'upload',
958
- label : editor.lang.common.upload,
965
+ label : commonLang.upload,
959
966
  style: 'height:40px',
960
967
  size : 29
961
968
  },
962
969
  {
963
970
  type : 'fileButton',
964
971
  id : 'uploadButton',
965
- label : editor.lang.common.uploadSubmit,
972
+ label : commonLang.uploadSubmit,
966
973
  filebrowser : 'info:url',
967
974
  'for' : [ 'upload', 'upload' ]
968
975
  }
@@ -970,8 +977,8 @@ CKEDITOR.dialog.add( 'link', function( editor )
970
977
  },
971
978
  {
972
979
  id : 'advanced',
973
- label : editor.lang.link.advanced,
974
- title : editor.lang.link.advanced,
980
+ label : linkLang.advanced,
981
+ title : linkLang.advanced,
975
982
  elements :
976
983
  [
977
984
  {
@@ -987,21 +994,21 @@ CKEDITOR.dialog.add( 'link', function( editor )
987
994
  {
988
995
  type : 'text',
989
996
  id : 'advId',
990
- label : editor.lang.link.id,
997
+ label : linkLang.id,
991
998
  setup : setupAdvParams,
992
999
  commit : commitAdvParams
993
1000
  },
994
1001
  {
995
1002
  type : 'select',
996
1003
  id : 'advLangDir',
997
- label : editor.lang.link.langDir,
1004
+ label : linkLang.langDir,
998
1005
  'default' : '',
999
1006
  style : 'width:110px',
1000
1007
  items :
1001
1008
  [
1002
- [ editor.lang.common.notSet, '' ],
1003
- [ editor.lang.link.langDirLTR, 'ltr' ],
1004
- [ editor.lang.link.langDirRTL, 'rtl' ]
1009
+ [ commonLang.notSet, '' ],
1010
+ [ linkLang.langDirLTR, 'ltr' ],
1011
+ [ linkLang.langDirRTL, 'rtl' ]
1005
1012
  ],
1006
1013
  setup : setupAdvParams,
1007
1014
  commit : commitAdvParams
@@ -1010,7 +1017,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1010
1017
  type : 'text',
1011
1018
  id : 'advAccessKey',
1012
1019
  width : '80px',
1013
- label : editor.lang.link.acccessKey,
1020
+ label : linkLang.acccessKey,
1014
1021
  maxLength : 1,
1015
1022
  setup : setupAdvParams,
1016
1023
  commit : commitAdvParams
@@ -1025,7 +1032,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1025
1032
  [
1026
1033
  {
1027
1034
  type : 'text',
1028
- label : editor.lang.link.name,
1035
+ label : linkLang.name,
1029
1036
  id : 'advName',
1030
1037
  setup : setupAdvParams,
1031
1038
  commit : commitAdvParams
@@ -1033,7 +1040,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1033
1040
  },
1034
1041
  {
1035
1042
  type : 'text',
1036
- label : editor.lang.link.langCode,
1043
+ label : linkLang.langCode,
1037
1044
  id : 'advLangCode',
1038
1045
  width : '110px',
1039
1046
  'default' : '',
@@ -1043,7 +1050,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1043
1050
  },
1044
1051
  {
1045
1052
  type : 'text',
1046
- label : editor.lang.link.tabIndex,
1053
+ label : linkLang.tabIndex,
1047
1054
  id : 'advTabIndex',
1048
1055
  width : '80px',
1049
1056
  maxLength : 5,
@@ -1067,7 +1074,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1067
1074
  [
1068
1075
  {
1069
1076
  type : 'text',
1070
- label : editor.lang.link.advisoryTitle,
1077
+ label : linkLang.advisoryTitle,
1071
1078
  'default' : '',
1072
1079
  id : 'advTitle',
1073
1080
  setup : setupAdvParams,
@@ -1076,7 +1083,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1076
1083
  },
1077
1084
  {
1078
1085
  type : 'text',
1079
- label : editor.lang.link.advisoryContentType,
1086
+ label : linkLang.advisoryContentType,
1080
1087
  'default' : '',
1081
1088
  id : 'advContentType',
1082
1089
  setup : setupAdvParams,
@@ -1092,7 +1099,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1092
1099
  [
1093
1100
  {
1094
1101
  type : 'text',
1095
- label : editor.lang.link.cssClasses,
1102
+ label : linkLang.cssClasses,
1096
1103
  'default' : '',
1097
1104
  id : 'advCSSClasses',
1098
1105
  setup : setupAdvParams,
@@ -1101,7 +1108,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1101
1108
  },
1102
1109
  {
1103
1110
  type : 'text',
1104
- label : editor.lang.link.charset,
1111
+ label : linkLang.charset,
1105
1112
  'default' : '',
1106
1113
  id : 'advCharset',
1107
1114
  setup : setupAdvParams,
@@ -1112,16 +1119,24 @@ CKEDITOR.dialog.add( 'link', function( editor )
1112
1119
  },
1113
1120
  {
1114
1121
  type : 'hbox',
1122
+ widths : [ '45%', '55%' ],
1115
1123
  children :
1116
1124
  [
1117
1125
  {
1118
1126
  type : 'text',
1119
- label : editor.lang.link.styles,
1127
+ label : linkLang.rel,
1128
+ 'default' : '',
1129
+ id : 'advRel',
1130
+ setup : setupAdvParams,
1131
+ commit : commitAdvParams
1132
+ },
1133
+ {
1134
+ type : 'text',
1135
+ label : linkLang.styles,
1120
1136
  'default' : '',
1121
1137
  id : 'advStyles',
1122
1138
  setup : setupAdvParams,
1123
1139
  commit : commitAdvParams
1124
-
1125
1140
  }
1126
1141
  ]
1127
1142
  }
@@ -1132,42 +1147,23 @@ CKEDITOR.dialog.add( 'link', function( editor )
1132
1147
  ],
1133
1148
  onShow : function()
1134
1149
  {
1135
- this.fakeObj = false;
1136
-
1137
1150
  var editor = this.getParentEditor(),
1138
1151
  selection = editor.getSelection(),
1139
- ranges = selection.getRanges(),
1140
- element = null,
1141
- me = this;
1142
- // Fill in all the relevant fields if there's already one link selected.
1143
- if ( ranges.length == 1 )
1144
- {
1152
+ element = null;
1145
1153
 
1146
- var rangeRoot = ranges[0].getCommonAncestor( true );
1147
- element = rangeRoot.getAscendant( 'a', true );
1148
- if ( element && element.getAttribute( 'href' ) )
1149
- {
1150
- selection.selectElement( element );
1151
- }
1152
- else if ( ( element = rangeRoot.getAscendant( 'img', true ) ) &&
1153
- element.getAttribute( '_cke_real_element_type' ) &&
1154
- element.getAttribute( '_cke_real_element_type' ) == 'anchor' )
1155
- {
1156
- this.fakeObj = element;
1157
- element = editor.restoreRealElement( this.fakeObj );
1158
- selection.selectElement( this.fakeObj );
1159
- }
1160
- else
1161
- element = null;
1162
- }
1154
+ // Fill in all the relevant fields if there's already one link selected.
1155
+ if ( ( element = plugin.getSelectedLink( editor ) ) && element.hasAttribute( 'href' ) )
1156
+ selection.selectElement( element );
1157
+ else
1158
+ element = null;
1163
1159
 
1164
1160
  this.setupContent( parseLink.apply( this, [ editor, element ] ) );
1165
1161
  },
1166
1162
  onOk : function()
1167
1163
  {
1168
- var attributes = { href : 'javascript:void(0)/*' + CKEDITOR.tools.getNextNumber() + '*/' },
1164
+ var attributes = {},
1169
1165
  removeAttributes = [],
1170
- data = { href : attributes.href },
1166
+ data = {},
1171
1167
  me = this,
1172
1168
  editor = this.getParentEditor();
1173
1169
 
@@ -1179,12 +1175,12 @@ CKEDITOR.dialog.add( 'link', function( editor )
1179
1175
  case 'url':
1180
1176
  var protocol = ( data.url && data.url.protocol != undefined ) ? data.url.protocol : 'http://',
1181
1177
  url = ( data.url && data.url.url ) || '';
1182
- attributes._cke_saved_href = ( url.indexOf( '/' ) === 0 ) ? url : protocol + url;
1178
+ attributes[ 'data-cke-saved-href' ] = ( url.indexOf( '/' ) === 0 ) ? url : protocol + url;
1183
1179
  break;
1184
1180
  case 'anchor':
1185
1181
  var name = ( data.anchor && data.anchor.name ),
1186
1182
  id = ( data.anchor && data.anchor.id );
1187
- attributes._cke_saved_href = '#' + ( name || id || '' );
1183
+ attributes[ 'data-cke-saved-href' ] = '#' + ( name || id || '' );
1188
1184
  break;
1189
1185
  case 'email':
1190
1186
 
@@ -1231,7 +1227,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1231
1227
  }
1232
1228
  }
1233
1229
 
1234
- attributes._cke_saved_href = linkHref.join( '' );
1230
+ attributes[ 'data-cke-saved-href' ] = linkHref.join( '' );
1235
1231
  break;
1236
1232
  }
1237
1233
 
@@ -1259,7 +1255,10 @@ CKEDITOR.dialog.add( 'link', function( editor )
1259
1255
  addFeature( 'top' );
1260
1256
 
1261
1257
  onclickList.push( featureList.join( ',' ), '\'); return false;' );
1262
- attributes[ '_cke_pa_onclick' ] = onclickList.join( '' );
1258
+ attributes[ 'data-cke-pa-onclick' ] = onclickList.join( '' );
1259
+
1260
+ // Add the "target" attribute. (#5074)
1261
+ removeAttributes.push( 'target' );
1263
1262
  }
1264
1263
  else
1265
1264
  {
@@ -1268,7 +1267,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1268
1267
  else
1269
1268
  removeAttributes.push( 'target' );
1270
1269
 
1271
- removeAttributes.push( '_cke_pa_onclick', 'onclick' );
1270
+ removeAttributes.push( 'data-cke-pa-onclick', 'onclick' );
1272
1271
  }
1273
1272
  }
1274
1273
 
@@ -1284,11 +1283,15 @@ CKEDITOR.dialog.add( 'link', function( editor )
1284
1283
  removeAttributes.push( attrName );
1285
1284
  };
1286
1285
 
1287
- if ( this._.selectedElement )
1288
- advAttr( 'advId', 'id' );
1286
+ advAttr( 'advId', 'id' );
1289
1287
  advAttr( 'advLangDir', 'dir' );
1290
1288
  advAttr( 'advAccessKey', 'accessKey' );
1291
- advAttr( 'advName', 'name' );
1289
+
1290
+ if ( data.adv[ 'advName' ] )
1291
+ attributes[ 'name' ] = attributes[ 'data-cke-saved-name' ] = data.adv[ 'advName' ];
1292
+ else
1293
+ removeAttributes = removeAttributes.concat( [ 'data-cke-saved-name', 'name' ] );
1294
+
1292
1295
  advAttr( 'advLangCode', 'lang' );
1293
1296
  advAttr( 'advTabIndex', 'tabindex' );
1294
1297
  advAttr( 'advTitle', 'title' );
@@ -1296,16 +1299,23 @@ CKEDITOR.dialog.add( 'link', function( editor )
1296
1299
  advAttr( 'advCSSClasses', 'class' );
1297
1300
  advAttr( 'advCharset', 'charset' );
1298
1301
  advAttr( 'advStyles', 'style' );
1302
+ advAttr( 'advRel', 'rel' );
1299
1303
  }
1300
1304
 
1305
+
1306
+ // Browser need the "href" fro copy/paste link to work. (#6641)
1307
+ attributes.href = attributes[ 'data-cke-saved-href' ];
1308
+
1301
1309
  if ( !this._.selectedElement )
1302
1310
  {
1303
1311
  // Create element if current selection is collapsed.
1304
1312
  var selection = editor.getSelection(),
1305
- ranges = selection.getRanges();
1313
+ ranges = selection.getRanges( true );
1306
1314
  if ( ranges.length == 1 && ranges[0].collapsed )
1307
1315
  {
1308
- var text = new CKEDITOR.dom.text( attributes._cke_saved_href, editor.document );
1316
+ // Short mailto link text view (#5736).
1317
+ var text = new CKEDITOR.dom.text( data.type == 'email' ?
1318
+ data.email.address : attributes[ 'data-cke-saved-href' ], editor.document );
1309
1319
  ranges[0].insertNode( text );
1310
1320
  ranges[0].selectNodeContents( text );
1311
1321
  selection.selectRanges( ranges );
@@ -1315,58 +1325,27 @@ CKEDITOR.dialog.add( 'link', function( editor )
1315
1325
  var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
1316
1326
  style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why.
1317
1327
  style.apply( editor.document );
1318
-
1319
- // Id. Apply only to the first link.
1320
- if ( data.adv && data.adv.advId )
1321
- {
1322
- var links = this.getParentEditor().document.$.getElementsByTagName( 'a' );
1323
- for ( i = 0 ; i < links.length ; i++ )
1324
- {
1325
- if ( links[i].href == attributes.href )
1326
- {
1327
- links[i].id = data.adv.advId;
1328
- break;
1329
- }
1330
- }
1331
- }
1332
1328
  }
1333
1329
  else
1334
1330
  {
1335
1331
  // We're only editing an existing link, so just overwrite the attributes.
1336
1332
  var element = this._.selectedElement,
1337
- href = element.getAttribute( '_cke_saved_href' ),
1333
+ href = element.data( 'cke-saved-href' ),
1338
1334
  textView = element.getHtml();
1339
1335
 
1340
- // IE BUG: Setting the name attribute to an existing link doesn't work.
1341
- // Must re-create the link from weired syntax to workaround.
1342
- if ( CKEDITOR.env.ie && attributes.name != element.getAttribute( 'name' ) )
1343
- {
1344
- var newElement = new CKEDITOR.dom.element( '<a name="' + CKEDITOR.tools.htmlEncode( attributes.name ) + '">',
1345
- editor.document );
1346
-
1347
- selection = editor.getSelection();
1348
-
1349
- element.moveChildren( newElement );
1350
- element.copyAttributes( newElement, { name : 1 } );
1351
- newElement.replace( element );
1352
- element = newElement;
1353
-
1354
- selection.selectElement( element );
1355
- }
1356
-
1357
1336
  element.setAttributes( attributes );
1358
1337
  element.removeAttributes( removeAttributes );
1359
- // Update text view when user changes protocol #4612.
1360
- if (href == textView)
1361
- element.setHtml( attributes._cke_saved_href );
1362
- // Make the element display as an anchor if a name has been set.
1363
- if ( element.getAttribute( 'name' ) )
1364
- element.addClass( 'cke_anchor' );
1365
- else
1366
- element.removeClass( 'cke_anchor' );
1367
1338
 
1368
- if ( this.fakeObj )
1369
- editor.createFakeElement( element, 'cke_anchor', 'anchor' ).replace( this.fakeObj );
1339
+ if ( data.adv && data.adv.advName && CKEDITOR.plugins.link.synAnchorSelector )
1340
+ element.addClass( element.getChildCount() ? 'cke_anchor' : 'cke_anchor_empty' );
1341
+
1342
+ // Update text view when user changes protocol (#4612).
1343
+ if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 )
1344
+ {
1345
+ // Short mailto link text view (#5736).
1346
+ element.setHtml( data.type == 'email' ?
1347
+ data.email.address : attributes[ 'data-cke-saved-href' ] );
1348
+ }
1370
1349
 
1371
1350
  delete this._.selectedElement;
1372
1351
  }
@@ -1385,7 +1364,7 @@ CKEDITOR.dialog.add( 'link', function( editor )
1385
1364
  {
1386
1365
  var linkType = this.getContentElement( 'info', 'linkType' ),
1387
1366
  urlField;
1388
- if ( linkType && linkType.getValue( ) == 'url' )
1367
+ if ( linkType && linkType.getValue() == 'url' )
1389
1368
  {
1390
1369
  urlField = this.getContentElement( 'info', 'url' );
1391
1370
  urlField.select();